问题
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