This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes JavaMail help 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 » Other JSE/JEE APIs
Bookmark "JavaMail help" Watch "JavaMail help" New topic
Author

JavaMail help

Maximiliano Gonzalez
Greenhorn

Joined: Aug 27, 2008
Posts: 11
Hello, I've never used JavaMail before.

I found this code in a blog and I think it helps but I need to know where should I place the user and password if I was to use Gmail's smtp. Here's the code:



Thanks!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
You might want to read through this excellent tutorial (which has many code examples): http://java.sun.com/developer/onlineTraining/JavaMail/contents.html

Look for "authentication" in particular.


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JavaMail help
 
Similar Threads
Sending Email from jsp page
FileNotFoundException while sending Mail as attachment using javamail
FileNotFoundException while sending mail with attachment using javamail
Sending an email in JSP
query about javamail api