I'm trying to setup SES/SMTP to send emails from my application via SES and the site is on Vapor.
However, I have created a IAM user and policies to match, but I still get the following error:
"message": "Failed to authenticate on SMTP server with username \"MYAPIKEY\" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 334 but got code \"530\", with message \"530 Must issue a STARTTLS command first\r\n\". Authenticator PLAIN returned Expected response code 235 but got code \"530\", with message \"530 Must issue a STARTTLS command first\r\n\".",
"exception": "Swift_TransportException",
Vapor will inject these environment variables automatically. Make sure you also have MAIL_DRIVER set to ses (this is the default) using command vapor env:pull production.
Also check if your SES account is not in the sandbox mode (open SES in AWS console and it should have a note on top if it is.) so you can send e-mails not only to your verified ones and of course you have to add your domain and e-mail address in SES.
@themsaid whatever credential Vapor hands the app work fine cross-region. I had to adjust the Laravel services config -- ses needs to use a different environment variable for its region so I can specify us-east-1 without breaking everything else.
I'm sending mail from an app in us-east-2 via SES in us-east-1.