Discussion:
[Wonder-disc] "Must issue a STARTTLS command first" while sending email
Kamal D Shah
2009-02-06 10:16:38 UTC
Permalink
Hi all,

When I try sending email from my app using either WOMailDelivery or
ERMailDelivery, I get an error:

Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must
issue a STARTTLS command first. 27sm2810086wfa.10

at
com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:
1515)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)

I'm not doing anything fancy at all. Just simply using the API. I'm
using smtp.gmail.com for my smtp server and it is being set correctly
as evident from the launch properties I see in the console.

I looked up the internet and found others having similar issues which
they are able to resolve using:

props.put("mail.smtp.starttls.enable","true");

in their code which uses the javax.mail package.

What can I do to fix this while using WO/ER MailDelivery?

Thanks
Kamal
Pascal Robert
2009-07-22 14:21:29 UTC
Permalink
I also add the same problem this morning (Zimbra don't advertise the
LOGIN command unless a STARTTLS is done previously). I simply added

mail.smtp.starttls.enable = true

to my Properties file and it works. The er.javamail.* properties are
rewritten in their mail.smtp(s).* equivalents, so you can mix both
styles in your Properties file.
Post by Kamal D Shah
Hi all,
When I try sending email from my app using either WOMailDelivery or
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must
issue a STARTTLS command first. 27sm2810086wfa.10
at
1515)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
634)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
I'm not doing anything fancy at all. Just simply using the API. I'm
using smtp.gmail.com for my smtp server and it is being set
correctly as evident from the launch properties I see in the console.
I looked up the internet and found others having similar issues
props.put("mail.smtp.starttls.enable","true");
in their code which uses the javax.mail package.
What can I do to fix this while using WO/ER MailDelivery?
Thanks
Kamal
_______________________________________________
Do not post admin requests to the list. They will be ignored.
http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
-------------------------------------------------------
Pascal Robert

Learn WO at WOWODC'09 East in Montréal this August!
http://www.wocommunity.org/wowodc09/east

http://www.macti.ca | http://www.linkedin.com/in/macti

Skype | Twitter | AIM/iChat : MacTICanada

Loading...