Skip to content
Snippets Groups Projects
Commit 2739ac37 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

hotline#184785 : Technical : Adding Header to pass antispam filter

parent 02836c30
Branches
Tags
1 merge request!4906hotline#184785 : Technical : Adding Header to pass antispam filter
Pipeline #28839 passed with stage
in 38 minutes and 57 seconds
- correctif #184785 : Mails : Ajout de l'entête MIME-Version: 1.0 dans les courriels envoyés par Bokeh pour mieux passer les antispam
\ No newline at end of file
......@@ -22,8 +22,12 @@
class ZendAfi_Mail extends Zend_Mail {
use Trait_StormFileSystem;
const MIME_VERSION = 'MIME-Version';
const MIME_VERSION_1_0 = '1.0';
public function __construct($charset = 'utf-8') {
parent::__construct($charset);
$this->_headers[static::MIME_VERSION]= static::MIME_VERSION_1_0;
}
......
......@@ -1311,6 +1311,7 @@ class PayfipTemplatesAbonneDebtsPayDispatchWithPayfipStartErrorTest
$this->assertEquals( 'adminbib@annecy.com', $this->_mail_transport->getSentMails()[0]
->getRecipients()[0]);
$this->assertContains( 'Payfip: transaction en erreur', str_replace('? =?utf-8?Q?','',quoted_printable_decode($this->_mail_transport->sent_mail->getSubject())));
$this->assertEquals( '1.0', $this->_mail_transport->sent_mail->getHeaders()['MIME-Version']);
$this->assertEquals( 'Une erreur est survenue lors d\'une tentative de paiement vers Payfip<br/>Code de l\'erreur : {"label":"Le format du param\u00e8tre REFDET n\'est pas conforme","code":"R3","severity":"2"}. <br/>Message d\'erreur: Transaction (ref: 20230109_090200, idop: ) restée non synchronisée ()',
quoted_printable_decode($this->_mail_transport->getSentMails()[0]->getBodyHtml(true)) );
......
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