Amazon SES with PHPMailer

I know I’m asking a question that has been addressed a lot of times, but I am unable to make the PHPmailer work with either Amazon SES or any other SMTP service. The event log consistently shows

Error sending email to xyz@gmail.com SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

My configuration for smtp SES is:

define(“PHPMAILERHOST”,‘email-smtp.us-east-1.amazonaws.com’);
$phpmailer_smtpuser = ‘user’;
$phpmailer_smtppassword = ‘pass’;
define(‘PHPMAILERPORT’,25);
define(“PHPMAILER_SECURE”,‘tls’);
define(‘SMTP_TIMEOUT’,45);

Every time I insert this config or any other SMTP server for that matter, the sending stops and as soon as I default it to blank, the mails start going out. Have been trying different configuration options the whole day but none of them resolved this issue.
I plan to send a few thousand emails a day, so PHPmailer is the only choice I have right now.
Thanks

This is not the correct port to use for a secure connection. See the amazon ses documentation for which one to use.

Also you will get greater throughput using the API, see new development version, 2.11.6 : phpList for how to enable that. The topic is quite old but I think that it is still accurate.

I deleted the SMTP fields and tried the API route as well…the test email still fails despite creating new access key on SES

define(“PHPMAILER”,0);
define(‘AWS_ACCESSKEYID’,‘XYZ’);
define(‘AWS_SECRETKEY’,‘ABC’);
define(‘AWS_POSTURL’,‘https://email.us-west-2.amazonaws.com/’);

Any other suggestions where I could be doing it wrong?

@vishalsh521 Have you looked on the event log page for any errors reported there?

Amazon SES status: 400, result: HTTP/1.1 100 Continue HTTP/1.1 400 Bad Request x-amzn-RequestId: 38df5cd1-29d3-11e7-9027-0df1e60217ce Content-Type: text/xml Content-Length: 416 Date: Tue, 25 Apr 2017 16:21:22 GMT Connection: close Sender MessageRejected Email address is not verified. The following identities failed the check in region US-WEST-2: “XYZ” abc@xyz.com, abc@xyz.com 38df5cd1-29d3-11e7-9027-0df1e60217ce , curl error:

@vishalsh521 It looks like you have not setup the email addresses in the region correctly.
I don’t remember the details fully but think you need to identify the email addresses that will be used for sending from, and then while your account is sandboxed then you have to identify those you are sending too as well.
This could well have been the problem when you were trying to send through smtp. There is documentation on what you have to do on the amazon ses site.

Got it fixed…the email was not verified, hence not getting accepted…the campaign is live now…thanks for all the help