CMXX - mailer

This commit is contained in:
“VeLiTi”
2025-05-12 14:50:27 +02:00
parent 929fb89e3d
commit 41200633cb

View File

@@ -19,7 +19,7 @@ if (isset($post_content['type']) && $post_content['type'] !=''){
$mail_to = isset($post_content['to']) ? $post_content['to']: email;
//QUERY AND VERIFY ALLOWED
if ($command == 'update' && isAllowed('mailer',$profile,$permission,'U') === 1){
if (isAllowed('mailer',$profile,$permission,'U') === 1){
//CHECK MAIL TYPE
switch ($mail_type) {
@@ -28,7 +28,7 @@ if (isset($post_content['type']) && $post_content['type'] !=''){
//GET TEMPLATE
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_contactform.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_contactform.php' : './assets/mail/email_template_contactform.php');
include_once $mail_location;
//SEND MAIL
send_mail($mail_to,$mail_subject,$message,'','');
echo json_encode(array('status' => 'send'));