Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Was Authentication needed?

 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to ask whoever administers the SMTP server.
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:You will need to ask whoever administers the SMTP server.

You mean to godaddy?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the mail server is hosted elsewhere then it is a pretty safe bet that authentication will be needed.
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic