1

I am using Java mail api and hmailserver to send outbound emails from my localhost. I am using the SMTP relayer outbound.att.net with my username and password for authentication. When I run my program and check the logs I have the line:

"RECEIVED: 530 5.7.0 Must issue a STARTTLS command first"

I am confused considering I set up my mail properties to include the STARTTLS command:

            Properties props = System.getProperties();
        props.put("mail.smtp.host", host);
        props.put("mail.smtp.user", from);
        props.put("mail.smtp.password", pass);
        props.put("mail.smtp.port", "25");
        props.put("mail.smtp.auth", "true");
        props.put("mail.smtp.starttls.enable", "true");

Does anyone have an idea of what I may be doing incorrectly?

Jordan.J.D
  • 7,999
  • 11
  • 48
  • 78

1 Answers1

0

Check that you haven't made any of these common mistakes.

Based on the log output, it appears that you might not be using the JavaMail reference implementation. Perhaps you're using the GNU version of JavaMail? It may not support some of these features that are specific to the reference implementation.

If none of that solves your problem, include more of the debug output.

Bill Shannon
  • 29,579
  • 6
  • 38
  • 40
  • I ended up using `props.put("mail.smtp.starttls.required", "true");` and got the message that my email server did not support `STARTTLS`. So I need to find a different SMTP relayer that does not need `TLS`. If you know of one for me to use that will work let me know. I've been through more than 60 with none working. Preferably one I do not need to make an account for. – Jordan.J.D Apr 25 '14 at 20:16