Commit 14af5269 by Scott

Merge pull request #382 from JaggedJax/dev

Email improvements (logging, disabling SSL)
parents 83aac064 73b3e55c
...@@ -142,8 +142,18 @@ ...@@ -142,8 +142,18 @@
$mailer->Host=qa_opt('smtp_address'); $mailer->Host=qa_opt('smtp_address');
$mailer->Port=qa_opt('smtp_port'); $mailer->Port=qa_opt('smtp_port');
if (qa_opt('smtp_secure')) if (qa_opt('smtp_secure')){
$mailer->SMTPSecure=qa_opt('smtp_secure'); $mailer->SMTPSecure=qa_opt('smtp_secure');
}
else {
$mailer->SMTPOptions=array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
}
if (qa_opt('smtp_authenticate')) { if (qa_opt('smtp_authenticate')) {
$mailer->SMTPAuth=true; $mailer->SMTPAuth=true;
...@@ -152,7 +162,11 @@ ...@@ -152,7 +162,11 @@
} }
} }
return $mailer->Send(); $send_status = $mailer->Send();
if(!$send_status){
@error_log('PHP Question2Answer email send error: '.$mailer->ErrorInfo);
}
return $send_status;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment