Use PHPMailer in sending email bug reports
This commit is contained in:
parent
ef00d81c1d
commit
c13d06eccb
@ -191,16 +191,17 @@ final class MDErrorReporter {
|
||||
|
||||
$msg .= PHP_EOL . PHP_EOL;
|
||||
|
||||
$msg = shell_exec("echo " . escapeshellarg($msg) . " | gpg2 --always-trust --recipient " . escapeshellarg($to) . " --encrypt --armor --local-user 35CA0E31F6F44FB5 --sign");
|
||||
$msg = MDMailerHelper::pgp_encrypt($to, $msg);
|
||||
|
||||
// Set header
|
||||
$header = [
|
||||
'From' => $this->_contact_mail_addr,
|
||||
'X-Mailer' => 'PHP/' . phpversion()
|
||||
];
|
||||
$mail = MDMailerHelper::setup_PHPMailer();
|
||||
$mail->setFrom($this->_contact_mail_addr, $this->_contact_mail_addr);
|
||||
$mail->addAddress($to);
|
||||
$mail->addReplyTo(MD_CONF_EMAIL::SMTP_REPLY_TO_ERROR);
|
||||
$mail->isHTML(false);
|
||||
$mail->Subject = $subject;
|
||||
$mail->Body = "$msg";
|
||||
|
||||
// Send email
|
||||
mail("$to", "$subject", "$msg", $header);
|
||||
$mail->send();
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user