It's not a secret anymore!*
The moose likes Java in General and the fly likes How to send email without specifying SMTP PORT NO: using apache commons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to send email without specifying SMTP PORT NO: using apache commons " Watch "How to send email without specifying SMTP PORT NO: using apache commons " New topic
Author

How to send email without specifying SMTP PORT NO: using apache commons

Neha George
Greenhorn

Joined: Jan 31, 2013
Posts: 6
Hi,

I am given sender's email id,password and Smtp host name to send a mail in apache commons. I am able to code if smtp port number is given..is there any code to send mail without smtp port number.
Please do help me asap...
Thanks in advance
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1035
    
  10

One has to know the SMTP port number to communicate with it ! The default port number is 25 and I would be surprised if your server differed from this but if it did then you would have to know what is is and to explicitly specify it anyway!
Neha George
Greenhorn

Joined: Jan 31, 2013
Posts: 6
Thanks Richard Tookey ,

Sorry for late response.I could send email without using port number.

Thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send email without specifying SMTP PORT NO: using apache commons
 
Similar Threads
Blank Email Notification
Tomcat fails to send e-mail
java mail
Failing to send an email externally
530 5.7.1 Client was not authenticated