Is SES the only way to send email from Lambda?

萝らか妹 提交于 2020-06-17 01:46:27

问题


I am trying to use my company's mailhost for sending email to internal mail groups but I am unable to send an email. It throws exception as below:

"javax.mail.MessagingException: 501 5.0.0 HELO requires domain address
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1363)"

Is it a limitation or I need to use SES only for sending emails?

  • Is there any configuration that I need to do and I might have missed?
  • Anything to check in VPC if the ports are open? Should I use port number as 25 or 587?
  • Will it help if I assign the VPC to my lambda?

More details: 1) I am looking to make an email message more readable than what comes from SNS

Thanks!


回答1:


I got the answer for this from javax.mail.MessagingException: 501 5.5.1 HELO/EHLO requires domain address.

The main property that will fix this issue is props.put("mail.smtp.localhost", smtpHost);

Hope this will help someone.

Thanks!



来源:https://stackoverflow.com/questions/50165240/is-ses-the-only-way-to-send-email-from-lambda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!