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 .= 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
|
$mail = MDMailerHelper::setup_PHPMailer();
|
||||||
$header = [
|
$mail->setFrom($this->_contact_mail_addr, $this->_contact_mail_addr);
|
||||||
'From' => $this->_contact_mail_addr,
|
$mail->addAddress($to);
|
||||||
'X-Mailer' => 'PHP/' . phpversion()
|
$mail->addReplyTo(MD_CONF_EMAIL::SMTP_REPLY_TO_ERROR);
|
||||||
];
|
$mail->isHTML(false);
|
||||||
|
$mail->Subject = $subject;
|
||||||
|
$mail->Body = "$msg";
|
||||||
|
|
||||||
// Send email
|
$mail->send();
|
||||||
mail("$to", "$subject", "$msg", $header);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user