This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to send email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to send email" Watch "How to send email" New topic
Author

How to send email

Fella Oyebobo
Greenhorn

Joined: Apr 29, 2001
Posts: 2
How do I send an email, just a dummy email to someone, from a java apllication. This is going to cost me 100percent for extra credits if I don't get it done in two days.
Thanx.
manav kher
Ranch Hand

Joined: Nov 21, 2000
Posts: 98
try the javamail api its simple to use and you should find some sample code at www.javasoft.com I used it for a school project and its like 10 lines of code.
and if your code is not in java you can get plenty of freeware scripts/c code that should do the trick.
-manav
Fella Oyebobo
Greenhorn

Joined: Apr 29, 2001
Posts: 2
I tried the sun site u gave me and I couldn't find anything, pls I am so much in need of these. I don't know if I wasn't looking well or it was something else but kindly help me check for it.
Thanx
Originally posted by manav kher:
try the javamail api its simple to use and you should find some sample code at www.javasoft.com I used it for a school project and its like 10 lines of code.
and if your code is not in java you can get plenty of freeware scripts/c code that should do the trick.
-manav

Jyotsna Clarkin
Ranch Hand

Joined: Jan 26, 2001
Posts: 158
Originally posted by Fella Oyebobo:
I don't know if I wasn't looking well or it was something else but kindly help me check for it.

Most sites have a search engine. You should at least be able to use these effectively.
Here is the JavaMail API link http://www.javasoft.com/products/javamail/index.html
and the FAQ http://www.javasoft.com/products/javamail/FAQ.html
I have never used JavaMail so I can't help any more than that. Sorry.
regards,
Jyotsna
Maky Chopra
Ranch Hand

Joined: Apr 11, 2001
Posts: 149
Here's a sample javamail servlet I used.. your application would have similar code :
Edited by me
Come to think of it.. When was the last time someone gave me the entire source code... Sorry guy. But i just deleted the source code that I had posted..
Here is the javamail faq that you should be looking at @ javasoft.
http://www.javasoft.com/products/javamail/FAQ.html
[This message has been edited by Mak Bhandari (edited April 30, 2001).]
manav kher
Ranch Hand

Joined: Nov 21, 2000
Posts: 98
this is not a good way to help a student. If you post the entire code then where is the incentive for him to learn and explore things on his own. You are not helping him at all.
-manav
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send email