SlideShare a Scribd company logo
JAVA SENDING MAIL
NHÓM THỰC HIỆN:
1. HỒ THỊ THANH THẢO
2. QUANG TUẤN ĐẠT
3. NGUYỄN THÀNH LUÂN
4. NGUYỄN VĂN NGÂN
27/06/2016 1
GVHD: Lê Thanh Trọng
AGENDA
 Introduction
 Protocols
 JavaMail Architecture
 JavaMail API Core Classes
 Sending E-mail Steps
 Demo
27/06/2016 2
INTRODUCTION – WHAT IS IT?
 The JavaMail is an API that is used to
compose, write and read electronic
messages (emails).
27/06/2016 3
INTRODUCTION – WHEN TO USE IT?
 The JavaMail facility can be applied to
many events.
 registering the user (sending confirmation
email)
 forgot password (sending password to the
users email id)
 sending notifications for important
updates etc.
27/06/2016 4
PROTOCOLS USED IN JAVAMAIL API
 SMTP - deliver email
 POP – get mail
 IMAP – get mail
 MIME - format of the messages
 NNTP and others
27/06/2016 5
JAVAMAIL ARCHITECTURE
27/06/2016 6
JAVAMAIL API CORE CLASSES
 javax.mail.Session
 javax.mail.Authenticator
 javax.mail.internet.MimeMessage
 javax.mail.Transport
27/06/2016 7
SENDING EMAIL - STEPS
1. Get the session object
2. Compose the message
3. Send the message
27/06/2016 8
SENDING EMAIL – 1. GET SESSION OBJECT
String to = “xxxxx@gmail.com"; // change accordingly
String from = “yyyyyyy@gmail.com"; // change accordingly
String host = "localhost"; // or IP address
//Get the session object
Properties properties = System.getProperties();
properties.setProperty("mail.smtp.host", host);
Session session = Session.getDefaultInstance (properties);
27/06/2016 9
SENDING EMAIL – 2. COMPOSE THE MESSAGE
// Compose the message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,new Internet
Address(to));
message.setSubject("Ping");
message.setText("Hello, this is example of sending email ");
27/06/2016 10
SENDING EMAIL – 3. SEND MESSAGE
// Send message
Transport.send(message);
System.out.println("message sent successfully....");
27/06/2016 11
RECOMMENDED WEBSITES
 http://www.tutorialspoint.com/javamail_api/ - đọc hiểu
 http://www.javatpoint.com/java-mail-api-tutorial - đọc code
 https://javamail.java.net/nonav/docs/api/ - đọc thêm
27/06/2016 12

More Related Content

What's hot

Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
swapnac12
 
Modern operating system.......
Modern operating system.......Modern operating system.......
Modern operating system.......
vignesh0009
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
Chapter 8 - Main Memory
Chapter 8 - Main MemoryChapter 8 - Main Memory
Chapter 8 - Main Memory
Wayne Jones Jnr
 
Scanner class
Scanner classScanner class
Scanner class
M Vishnuvardhan Reddy
 
Unit 5
Unit 5Unit 5
Operating system structures
Operating system structuresOperating system structures
Operating system structures
Mohd Arif
 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
Acad
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
Inocentshuja Ahmad
 
Packages in java
Packages in javaPackages in java
Packages in java
Jancypriya M
 
Data Designs (Software Engg.)
Data Designs (Software Engg.)Data Designs (Software Engg.)
Data Designs (Software Engg.)
Arun Shukla
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
A. S. M. Shafi
 
Lect2 conventional software management
Lect2 conventional software managementLect2 conventional software management
Lect2 conventional software management
meena466141
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Object oriented analysis and design unit- i
Object oriented analysis and design unit- iObject oriented analysis and design unit- i
Object oriented analysis and design unit- i
Shri Shankaracharya College, Bhilai,Junwani
 
Client-Server Computing
Client-Server ComputingClient-Server Computing
Client-Server Computing
Cloudbells.com
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
BE Smârt
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
Shahid Riaz
 
Student information system
Student information systemStudent information system
Student information system
sourabh singh sen
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
Krishnan MuthuManickam
 

What's hot (20)

Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Modern operating system.......
Modern operating system.......Modern operating system.......
Modern operating system.......
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
Chapter 8 - Main Memory
Chapter 8 - Main MemoryChapter 8 - Main Memory
Chapter 8 - Main Memory
 
Scanner class
Scanner classScanner class
Scanner class
 
Unit 5
Unit 5Unit 5
Unit 5
 
Operating system structures
Operating system structuresOperating system structures
Operating system structures
 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Data Designs (Software Engg.)
Data Designs (Software Engg.)Data Designs (Software Engg.)
Data Designs (Software Engg.)
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
 
Lect2 conventional software management
Lect2 conventional software managementLect2 conventional software management
Lect2 conventional software management
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Object oriented analysis and design unit- i
Object oriented analysis and design unit- iObject oriented analysis and design unit- i
Object oriented analysis and design unit- i
 
Client-Server Computing
Client-Server ComputingClient-Server Computing
Client-Server Computing
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
 
Student information system
Student information systemStudent information system
Student information system
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 

Viewers also liked

Simplify360 culture code
Simplify360 culture codeSimplify360 culture code
Simplify360 culture code
Simplify360
 
A Whole New Brain for Teachers
A Whole New Brain for TeachersA Whole New Brain for Teachers
A Whole New Brain for Teachers
Umes Shrestha
 
Baocao Web Tech Java Mail
Baocao Web Tech Java MailBaocao Web Tech Java Mail
Baocao Web Tech Java Mail
xicot
 
A Photo Reflection of Fab 8 NeuroELT Conference
A Photo Reflection of Fab 8 NeuroELT ConferenceA Photo Reflection of Fab 8 NeuroELT Conference
A Photo Reflection of Fab 8 NeuroELT Conference
Umes Shrestha
 
Diseño de un codificador decimal bcd
Diseño de un codificador decimal bcdDiseño de un codificador decimal bcd
Diseño de un codificador decimal bcd
magnielys
 
Basic SEO Presentation
Basic SEO PresentationBasic SEO Presentation
Basic SEO Presentation
Paul Kortman
 
Digital Marketing PPT
Digital Marketing PPTDigital Marketing PPT
Digital Marketing PPT
Narendra Sharma
 
Digital Marketing Overview
Digital Marketing OverviewDigital Marketing Overview
Digital Marketing Overview
Anton Koekemoer
 

Viewers also liked (8)

Simplify360 culture code
Simplify360 culture codeSimplify360 culture code
Simplify360 culture code
 
A Whole New Brain for Teachers
A Whole New Brain for TeachersA Whole New Brain for Teachers
A Whole New Brain for Teachers
 
Baocao Web Tech Java Mail
Baocao Web Tech Java MailBaocao Web Tech Java Mail
Baocao Web Tech Java Mail
 
A Photo Reflection of Fab 8 NeuroELT Conference
A Photo Reflection of Fab 8 NeuroELT ConferenceA Photo Reflection of Fab 8 NeuroELT Conference
A Photo Reflection of Fab 8 NeuroELT Conference
 
Diseño de un codificador decimal bcd
Diseño de un codificador decimal bcdDiseño de un codificador decimal bcd
Diseño de un codificador decimal bcd
 
Basic SEO Presentation
Basic SEO PresentationBasic SEO Presentation
Basic SEO Presentation
 
Digital Marketing PPT
Digital Marketing PPTDigital Marketing PPT
Digital Marketing PPT
 
Digital Marketing Overview
Digital Marketing OverviewDigital Marketing Overview
Digital Marketing Overview
 

Similar to Java Sending mail

Mail tracker mini
Mail tracker miniMail tracker mini
Mail tracker mini
pendyam
 
FINAL_INTERNSHIP_PPT.pptx
FINAL_INTERNSHIP_PPT.pptxFINAL_INTERNSHIP_PPT.pptx
FINAL_INTERNSHIP_PPT.pptx
NithinKumar737562
 
John Michael Q. Pineda
John Michael Q. PinedaJohn Michael Q. Pineda
John Michael Q. Pineda
John Michael Pineda
 
Ahmed Motair CV 2020
Ahmed Motair CV 2020Ahmed Motair CV 2020
Ahmed Motair CV 2020
Ahmed Mater
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
Roohul Amin
 
Laravel
LaravelLaravel
Laravel
tanveerkhan62
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
Vinod Gurram
 
Xml messaging with soap
Xml messaging with soapXml messaging with soap
Xml Messaging With Soap
Xml Messaging With SoapXml Messaging With Soap
Xml Messaging With Soap
AkramWaseem
 
Xml messaging with soap
Xml messaging with soapXml messaging with soap
Xml messaging with soap
Johnny Pork
 
Xm Lmessagingwith Soap
Xm Lmessagingwith SoapXm Lmessagingwith Soap
Xm Lmessagingwith Soap
LiquidHub
 

Similar to Java Sending mail (11)

Mail tracker mini
Mail tracker miniMail tracker mini
Mail tracker mini
 
FINAL_INTERNSHIP_PPT.pptx
FINAL_INTERNSHIP_PPT.pptxFINAL_INTERNSHIP_PPT.pptx
FINAL_INTERNSHIP_PPT.pptx
 
John Michael Q. Pineda
John Michael Q. PinedaJohn Michael Q. Pineda
John Michael Q. Pineda
 
Ahmed Motair CV 2020
Ahmed Motair CV 2020Ahmed Motair CV 2020
Ahmed Motair CV 2020
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Laravel
LaravelLaravel
Laravel
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
Xml messaging with soap
Xml messaging with soapXml messaging with soap
Xml messaging with soap
 
Xml Messaging With Soap
Xml Messaging With SoapXml Messaging With Soap
Xml Messaging With Soap
 
Xml messaging with soap
Xml messaging with soapXml messaging with soap
Xml messaging with soap
 
Xm Lmessagingwith Soap
Xm Lmessagingwith SoapXm Lmessagingwith Soap
Xm Lmessagingwith Soap
 

Recently uploaded

UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
Addu25809
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
shivani5543
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 

Recently uploaded (20)

UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 

Java Sending mail

  • 1. JAVA SENDING MAIL NHÓM THỰC HIỆN: 1. HỒ THỊ THANH THẢO 2. QUANG TUẤN ĐẠT 3. NGUYỄN THÀNH LUÂN 4. NGUYỄN VĂN NGÂN 27/06/2016 1 GVHD: Lê Thanh Trọng
  • 2. AGENDA  Introduction  Protocols  JavaMail Architecture  JavaMail API Core Classes  Sending E-mail Steps  Demo 27/06/2016 2
  • 3. INTRODUCTION – WHAT IS IT?  The JavaMail is an API that is used to compose, write and read electronic messages (emails). 27/06/2016 3
  • 4. INTRODUCTION – WHEN TO USE IT?  The JavaMail facility can be applied to many events.  registering the user (sending confirmation email)  forgot password (sending password to the users email id)  sending notifications for important updates etc. 27/06/2016 4
  • 5. PROTOCOLS USED IN JAVAMAIL API  SMTP - deliver email  POP – get mail  IMAP – get mail  MIME - format of the messages  NNTP and others 27/06/2016 5
  • 7. JAVAMAIL API CORE CLASSES  javax.mail.Session  javax.mail.Authenticator  javax.mail.internet.MimeMessage  javax.mail.Transport 27/06/2016 7
  • 8. SENDING EMAIL - STEPS 1. Get the session object 2. Compose the message 3. Send the message 27/06/2016 8
  • 9. SENDING EMAIL – 1. GET SESSION OBJECT String to = “xxxxx@gmail.com"; // change accordingly String from = “yyyyyyy@gmail.com"; // change accordingly String host = "localhost"; // or IP address //Get the session object Properties properties = System.getProperties(); properties.setProperty("mail.smtp.host", host); Session session = Session.getDefaultInstance (properties); 27/06/2016 9
  • 10. SENDING EMAIL – 2. COMPOSE THE MESSAGE // Compose the message MimeMessage message = new MimeMessage(session); message.setFrom(new InternetAddress(from)); message.addRecipient(Message.RecipientType.TO,new Internet Address(to)); message.setSubject("Ping"); message.setText("Hello, this is example of sending email "); 27/06/2016 10
  • 11. SENDING EMAIL – 3. SEND MESSAGE // Send message Transport.send(message); System.out.println("message sent successfully...."); 27/06/2016 11
  • 12. RECOMMENDED WEBSITES  http://www.tutorialspoint.com/javamail_api/ - đọc hiểu  http://www.javatpoint.com/java-mail-api-tutorial - đọc code  https://javamail.java.net/nonav/docs/api/ - đọc thêm 27/06/2016 12

Editor's Notes

  1. Trình bày quá trình hoạt động thông qua kiến trúc của javaMail