Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Configure SMTP for Amazon SES
I've configure Liferay to send mails via SMTP using Amazon SES.
portal-ext.properties
Liferay adds the following properties automatically when the protocol is smtps
Also I've added the advance properties
The mails never reach their destination, and in the logs I find the following message
Can anyone help?
Thanks on advances
portal-ext.properties
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=email-smtp.us-east-1.amazonaws.com
mail.session.mail.smtp.port=465
mail.session.mail.smtp.user=******************
mail.session.mail.smtp.password=******************
mail.session.mail.transport.protocol=smtps
Liferay adds the following properties automatically when the protocol is smtps
mail.smtps.socketFactory.port=465
mail.smtps.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.smtps.socketFactory.fallback=false
Also I've added the advance properties
mail.smtps.ssl.enable=true
mail.smtps.starttls.enable=true
The mails never reach their destination, and in the logs I find the following message
Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: email-smtp.us-east-1.amazonaws.com, port: 465
Can anyone help?
Thanks on advances
This is what I tried and it worked.
mail.session.mail.transport.protocol=smtp
mail.session.mail.smtp.ssl.enable=true
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=email-smtp.us-east-1.amazonaws.com
mail.session.mail.smtp.port=25
mail.session.mail.smtp.user=<Smtp Username>
mail.session.mail.smtp.password=<Smtp Password>
Note: The SMTP username and password are the ones that get generated when creating SMTP Credentials from the AWS Console. This is different from the IAM credentials
Also make sure there are no firewall settings blocking access to the remote port 25
mail.session.mail.transport.protocol=smtp
mail.session.mail.smtp.ssl.enable=true
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=email-smtp.us-east-1.amazonaws.com
mail.session.mail.smtp.port=25
mail.session.mail.smtp.user=<Smtp Username>
mail.session.mail.smtp.password=<Smtp Password>
Note: The SMTP username and password are the ones that get generated when creating SMTP Credentials from the AWS Console. This is different from the IAM credentials
Also make sure there are no firewall settings blocking access to the remote port 25
How do you configure the sender address when using Amazon SES? I'm completely unable to send any email through Liferay using SES because it keeps rejecting the email with error 554 Message rejected: Email address is not verified. I know for certain that the recipient email is verified (I'm still in the sandbox), but there is no way for me to configure the sending email. When creating SMTP credentials in AWS there is no way to specify the associated email address there either.
How did you get it to work?
Thanks,
Daniel
How did you get it to work?
Thanks,
Daniel
OK, I just found it. I had to go into Control Panel > Portal Settings > Email Notifications and set the sending address there to my SES verified sender. After doing that I was able to process outgoing email through SES.
Thanks,
Daniel
Thanks,
Daniel