I am trying to send email with Amazon\'s SES/SMTP and I am getting the following error:
javax.mail.MessagingException: Could not connect to SMTP host: em
These settings worked for me:
mail.transport.protocol=smtp mail.smtp.port=25 mail.smtp.auth=true mail.smtp.starttls.enable=true mail.smtp.starttls.required=true mail.smtp.host=email-smtp.us-east-1.amazonaws.com mail.smtp.user=[SMTP username] mail.smtp.password=[SMTP user password]
If you try to connect to connect using SSL connection, it rejected the connection. So you need to do STARTTLS after connection.
You can add mail.debug=true to see where it failed.
The sender email address must be a verified email address otherwise SES refuses to forward the email.