Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

Send an Email with JavaMail [Pictures, resources, and explained code included]

Hey guys, today I will be teaching you how to use the JavaMail packages to send an Email. I haven't made a tutorial in a while so go easy on me if I get something wrong.

Step #1.

Download JavaMail. You can download the latest JavaMail API here. In this tutorial I am using version 1.4.5, which as of now is the latest, complete version.

Step #2.

Import your JavaMail package by configuring your build path.
Spoiler (Click to View)

Step #3.

Set up your (simple & basic) class file.
Spoiler (Click to View)

Now all you have to do is call sendMail() from one of your other class files. There are many uses for sending Emails by Java. Explore them for yourself. You can modify anything as you would like. As I said in the beginning, I haven't done a tutorial in a while, so tell me if I messed up or forgot something.

Thanks for viewing! I hope you learned something.

P.S. Tell me what you come up with. I would love to see what creative minds people have.
Edit: Read it now that it's finished

Nice simple tutorial, never read anything on Emailing with java. Doesn't look very bad to do.
(Jan 13, 2013 07:35 PM)Victoria J Wrote:  Standing by...Ready to read this when posted

Yeah. Sorry. I am under 5 minutes away from being finished. HF has their buttons way to close. Thanks for waiting, I hope you'll like it.


Post re-uploaded. Sorry for the delay. I hope you guys like it.
This is very simple code, could you perhaps make a tutorial on something more complicated, like retrieving and manipulating an email from a email server.
Oh man, I was going to do a tutorial like this, congrats for beating me to it!

Good tutorial though, thanks!
Really nice tutorial, and well explained. Nice work.
goodbye
Thanks all. I am glad you like it. I hope I explained it well enough, it's not a hard concept anyways.

I plan to make more tutorials in the future if you guys can give me some ideas, or something you'd like to learn.
Thanks for sharing this tutorial, I'm going to try this out some time!
(Jan 14, 2013 03:57 PM)Arbitrage Wrote:  Thanks for sharing this tutorial, I'm going to try this out some time!

No problem. See what you can make with it. I have made some pretty interesting things myself, but I would like to see what others can com up with.
Thanks for this tutorial, I'm going to make a simple email client with this tomorrow :)
(Jan 14, 2013 04:32 PM)__init__ Wrote:  Thanks for this tutorial, I'm going to make a simple email client with this tomorrow :)

No problem. I'm glad you guys like the tutorial.
http://www.newocr.com/
a picture to text converter for all you leechers out there. :P
it works 100% no flaws.
(Jan 15, 2013 02:55 AM)matt Wrote:  http://www.newocr.com/
a picture to text converter for all you leechers out there. :P
it works 100% no flaws.

Okay. The purpose of pictures is so people can see the code and know what it should looks like. Then they learn instead of copying and pasting it. It also gives them the opportunity to ask questions while they read.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by WntdArtMar 2, 2024 01:39 AM 2 444 Mar 2, 2024 01:39 AM
Last Post: lology
[Python] by Harley QuinnSep 10, 2020 01:55 AM 15 327 Sep 10, 2020 01:55 AM
Last Post: Harley Quinn
[Python] by SavyerAug 20, 2016 04:45 PM 4 161 Aug 20, 2016 04:45 PM
Last Post: Savyer