Sending mail using Amazon SES

Can someone please provide some assistance in getting mail.properties file configured to send mail through Amazon SES?

What does the mail.properties file need to include to use Amazon SES as SMTP server?
Does this line config.mail.settings.userid = <email address> have to be set to an email address?
because amazon ses gives an ID not an email address

Hi Zachery,

You should set the config.mail.settings.userid property to the ID given by Amazon, and the config.mail.settings.send.from-email property to the email address you’d like to see in the “Sender” field.

I have done that and email still wont send through the system. Does the password provided by Amazon have to be base64 encoded in the file?

Yes, the password should be base64 encoded regardless of the email provider.

If that doesn’t work too, please check the taskman log for possible errors while sending.

I am getting this error message but know for 100% that the username and password are correct because i just created them on Amazon

    May 07 11:10:13 [url=https://papertrailapp.com/systems/ip-10-0-1-92/events?centered_on_id=930164888859451399]ip-10-0-1-92[/url] [url=https://papertrailapp.com/groups/6822652/events?centered_on_id=930164888859451399&q=program%3Ataskman]taskman:[/url] [ERROR] - 2018-05-07 15:10:13,638 - from SendEmailTask in Thread-55133 - Error during sending mail: javax.mail.AuthenticationFailedException: 535 Authentication Credentials Invalid

    May 07 11:10:13 ip-10-0-1-92 taskman: java.lang.RuntimeException: javax.mail.AuthenticationFailedException: 535 Authentication Credentials Invalid

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.services.mail.InternalMailService.send(InternalMailService.java:147)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.services.mail.InternalMailService.send(InternalMailService.java:40)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.services.mail.MailService.send(MailService.java:142)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.services.mail.MailService.send(MailService.java:130)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.tasks.devreg.SendEmailTask.execute(SendEmailTask.java:22)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.taskman.Task.run(Task.java:128)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at java.lang.Thread.run(Thread.java:745)

    May 07 11:10:13 ip-10-0-1-92 taskman: Caused by: javax.mail.AuthenticationFailedException: 535 Authentication Credentials Invalid

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:932)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:843)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:748)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at javax.mail.Service.connect(Service.java:388)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at javax.mail.Service.connect(Service.java:246)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at javax.mail.Service.connect(Service.java:195)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at javax.mail.Transport.send0(Transport.java:254)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at javax.mail.Transport.send(Transport.java:124)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.services.mail.InternalMailSender.send(InternalMailSender.java:11)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011at com.backendless.services.mail.InternalMailService.send(InternalMailService.java:141)

    May 07 11:10:13 ip-10-0-1-92 taskman: #011… 6 common frames omitted

Just to make sure: have you restarted TaskMan after changing the config?

Did you ever change the mail properties for an app in the Developer’s Console? In this case they would override the ones you set in mail.properties.

Yes now taskman has been restarted after ensuring that mail.properties file and notification.properties file was updated with base64 encoded SES credentials. Still getting the

    May 07 12:25:35 [url=https://papertrailapp.com/systems/ip-10-0-1-92/events?centered_on_id=930183853216243747]ip-10-0-1-92[/url] [url=https://papertrailapp.com/groups/6822652/events?centered_on_id=930183853216243747&q=program%3Ataskman]taskman:[/url] [ERROR] - 2018-05-07 16:25:35,051 - from SendEmailTask in Thread-10 - Error during sending mail: javax.mail.AuthenticationFailedException: 535 Authentication Credentials Invalid

I am generating this error by testing the recover password from console login page.

All resolved at this time now. For some reason the username and password that I created earlier it was not being accepted. So i went ahead and created a new SMTP user and used those credentials, base64 encoded password and now emails are sending with no issues from AWS SES.

Thanks for help!

Zack