LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Javamail (https://www.linuxquestions.org/questions/programming-9/javamail-847465/)

grob115 11-30-2010 09:55 AM

Javamail
 
Was told that I need to use Javamail for a project to send mail rather than using "mail" or "mailx". Has anyone here done this? Any pointers or sites you've used and can recommend?

paulsm4 11-30-2010 10:26 AM

Hi -

No, you can use EITHER JavaMail OR do a "Runtime.exec ("mail ...");". Your choice :)

JavaMail is just an API - you need a real "mail agent" for it to talk to.

Here's a good link:
http://www.mkyong.com/java/javamail-...-smtp-example/

SUGGESTION:
1. Set up a GMail account (for testing purposes)

2. Write the JavaMail "hello world" in the link above

3. Use these GMail SMTP parameters:
http://mail.google.com/support/bin/a...n&answer=13287

4. Once your test case works, apply it to your actual app.

'Hope that helps


All times are GMT -5. The time now is 12:20 PM.