diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-05-14 10:52:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 10:52:48 +0300 |
commit | 0187b71729484a9f173d978239ff0a3cb37a5d7b (patch) | |
tree | 770d517a1268808f85abe291371b84b03a0b3d14 /config/environment | |
parent | fb1be4d50ad1f5c3c2c2915fc42caf1f4fd31a2d (diff) |
Replace Zend Mail with PHPMailer (#15891)
* require composer package phpmailer/phpmailer
* change mail class to use phpmailer instead of Zend_Mail
* removes Zend_Mail and Zend_Mime
* submodule
* fix tests
* enable smtp debug for test mail command
* fix embedded images
* set language for phpmailer
* apply some review feedback
* removes Zend_Validate (#15907)
* don't inline file without cid
* submodule update
* fix test
* decouples Mail class from PHPMailer and moves sending mails to new transport layer
* submodule
* cleanup
* unset xmailer header
* simplify mail attachment handling
* adds methods to add bcc recipients
* change implementation of setReplyTo
Diffstat (limited to 'config/environment')
-rw-r--r-- | config/environment/test.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config/environment/test.php b/config/environment/test.php index bfd8e54460..13c5c390cd 100644 --- a/config/environment/test.php +++ b/config/environment/test.php @@ -120,15 +120,15 @@ return array( } }), - array('Test.Mail.send', function (\Zend_Mail $mail) { + array('Test.Mail.send', function (\PHPMailer\PHPMailer\PHPMailer $mail) { $outputFile = PIWIK_INCLUDE_PATH . '/tmp/' . Common::getRequestVar('module', '') . '.' . Common::getRequestVar('action', '') . '.mail.json'; - $outputContent = str_replace("=\n", "", $mail->getBodyHtml($textOnly = true) ?: $mail->getBodyText($textOnly = true)); + $outputContent = str_replace("=\n", "", $mail->Body ?: $mail->AltBody); $outputContent = str_replace("=0A", "\n", $outputContent); $outputContent = str_replace("=3D", "=", $outputContent); $outputContents = array( - 'from' => $mail->getFrom(), - 'to' => $mail->getRecipients(), - 'subject' => $mail->getSubject(), + 'from' => $mail->From, + 'to' => $mail->getAllRecipientAddresses(), + 'subject' => $mail->Subject, 'contents' => $outputContent ); file_put_contents($outputFile, json_encode($outputContents)); |