aspose file tools*
The moose likes Servlets and the fly likes Was Authentication needed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Was Authentication needed?" Watch "Was Authentication needed?" New topic
Author

Was Authentication needed?

Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Hi all,
I am just write a code to send mail using Servlet.Our company site was hosted in a web hosting.I just want to test my code with that hosting.I take the smtp server i.e) smtp.host.com and my question is will authentication needed to send mail? my mail id is rajkumar@companyname.in and if i use this as my from address in the code, does i need to authenticate it?
Please shed some light on this.


Never try to be a hard-worker. Be a smart-worker.
My Blog
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You will need to ask whoever administers the SMTP server.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Paul Sturrock wrote:You will need to ask whoever administers the SMTP server.

You mean to godaddy?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42280
    
  64
If the mail server is hosted elsewhere then it is a pretty safe bet that authentication will be needed.


Ping & DNS - my free Android networking tools app
Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Ulf Dittmer wrote:If the mail server is hosted elsewhere then it is a pretty safe bet that authentication will be needed.


But i use my mail id, so why do i need authentication as no one except admins will send those mails.
Anyhow, how could i add the authentication,either put it in properties.?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42280
    
  64
If the mail server is hosted elsewhere -meaning not on an internal network- then not requiring authentication would be a security and/or spam disaster waiting to happen. Just think about it.

Code for how to use authentication with JavaMail can be found at http://java.sun.com/developer/onlineTraining/JavaMail/contents.html
 
jQuery in Action, 2nd edition
 
subject: Was Authentication needed?