Search code examples
phpamazon-web-servicesphpmaileramazon-ses

Best settings for amazon ses an phpmailer DKIM settings


I am using PHPMailer and Amazone SES to send emails to my users.

Recently a lot of my users toled me that the mail is going to spam, so I decide to use DKIM in Amazone SES

My question is

what should I use in PHPmailer settings to send the emails with DKIM

Shall I only use this ?

$automail->DKIM_domain = '_amazonses.domain.com';
$automail->DKIM_selector = 'dowirhwer894324234h2g43k2j3k4234';

or do I need more settings?

thanks a lot


Solution

  • The domain and selector are all you need to provide to PHPMailer, yes.

    Personally, I prefer to use the API from the AWS PHP SDK to send emails via SES in PHP. You can do it with the latest version of PHPMailer, sure as it has support for DKIM. Just make sure you set up everything correctly in Route 53 or your DNS provider for that domain.