Download presentation
Presentation is loading. Please wait.
Published byShana Ramsey Modified over 8 years ago
1
Sending E-Mail
2
Contents A)Sending Mail Using Command Line B)Sending Mail Using GUI
3
A) Sending Mail Using Command Line 1. Obtaining the Encoded Username and Password Using BASE64Encoder 2. Sending Mail
4
1. Obtaining the Encoded Username and Password Using BASE64Encoder
5
2. Sending Mail Encoded username Encoded password A blank line must be inserted before the content
6
B) Sending Mail Using GUI
7
Solution I.Developing the View II.Adding Listener to Send Button
8
I. Developing the View
9
II. Adding Listener to Send Button 1.Asking the MailSender to Send Mail 2.Developing MailSender 3.Clearing Some GUI Components
10
1. Asking the MailSender to Send Mail
12
2. Developing MailSender 2.1. Using Low Level Programming 2.2. Using JavaMail API
13
2.1. Using Low Level Programming 2.1.1. Creating a Connection to the Mail Server 2.1.2. Sending Mail to the Mail Server
14
2.1.1. Creating a Connection to the Mail Server
15
2.1.2. Sending Mail to the Mail Server
17
2.2. Using JavaMail API 2.2.1. Installing JavaMail API 2.2.2. Modifying the Design 2.2.3. Changing MailSender to LowLevelMailSender 2.2.4. Creating the MailSender Interface 2.2.5. Hooking MailFrame to MailSender 2.2.6. Developing JavaMailSender
18
2.2.1. Installing JavaMail API Download the JavaMail implementation Unbundle the javamail-[version].zip file Add the mail.jar file to project's CLASSPATH
19
2.2.2. Modifying the Design Current design
20
Modified design
21
2.2.3. Changing MailSender to LowLevelMailSender
22
2.2.4. Creating the MailSender Interface
23
2.2.5. Hooking MailFrame to MailSender
24
2.2.6. Developing JavaMailSender 2.2.6.1. Getting a Session 2.2.6.2. Developing the Message 2.2.6.3. Sending the Message
25
2.2.6.1. Getting a Session
26
2.2.6.2. Developing the Message
27
2.2.6.3. Sending the Message
28
2.3. Clearing Some GUI Components
29
References 1. Core Java, Volume II – Advanced Features, Eighth Edition, Chapter 3. Cay S. Horstmann and Gary Cornell. Prentice Hall, 2008 2. jGuru: Fundamentals of the JavaMail API. http://java.sun.com/developer/onlineTraining/Ja vaMail/index.html
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.