Your cart
Vo vašom košíku nie sú žiadne ďalšie položky
Configure Prestashop 1.7 to work with SMTP
Comments (1)
Thank you for this help,
For DKIM validation you have to declare private key, domain and selector in header of the mail
but prestashop dont provide this parameters in the back office, so you can't use DKIM validation.
there is a existing module for DKIM validation or do you have to code a module ?
or do you have to modify Mail.php in classes directory and adding such a code like this ?
// here this tree parameters you have to get in backoffice
$privateKey = '-----BEGIN RSA PRIVATE KEY-----private key here-----END RSA PRIVATE KEY-----'; // you can put private key also in a file
$domainName = 'example.com';
$selector = 'dkim_selector';
// here you have to use Swift_Signers_DKIMSigner class to send DKIM signed mail
$signer = new Swift_Signers_DKIMSigner($privateKey, $domainName, $selector);
$message = Swift_SignedMessage::newInstance('sujet')
->setFrom(array( 'user@example.com' => "USER"))
->setTo(array('to@examplel.com'))
->setBody('hello example', 'text/html', 'utf-8');
$message->addPart('Hello example', 'text/plain', 'utf-8');
$message->attachSigner($signer);
$mailer->send($message))