jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes Must issue a starttls command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Must issue a starttls command" Watch "Must issue a starttls command" New topic
Author

Must issue a starttls command

Chetan Sharma
Greenhorn

Joined: Nov 20, 2008
Posts: 7

I am using the above code and getting the error must issue a starttls command first. Please help
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
The JavaEnterpriseEditionFaq answers this.


Ping & DNS - updated with new look and Ping home screen widget
Chetan Sharma
Greenhorn

Joined: Nov 20, 2008
Posts: 7
It mentions in there to set the property mail.smtps.starttls.enable equal to true as you can see it in the code I have already done so but still I am getting the same error. Please help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Looking at that document, I don't think that user and email address are the same - the former doesn't have the "@gmail.com" suffix.
Chetan Sharma
Greenhorn

Joined: Nov 20, 2008
Posts: 7
Sorry that does not work. I removed @gmail.com suffix but still getting the same error.
Kedar Bhise
Greenhorn

Joined: Dec 29, 2009
Posts: 4
Chetan,

I copied your code into Eclipse and tried it out. Worked flawlessly on the first try. Thus, seems like nothing is wrong with your code and the properties you are setting up.

My (sanitised) DEBUG log follows:



Perhaps, some missing libraries?

Kedar P Bhise
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Must issue a starttls command
 
Similar Threads
Email formating...
problem about java mail
Sending SMS from Java
urgent help in java mail
Java mail using gmail