SlideShare une entreprise Scribd logo
1  sur  10
Mule – SMTP
Connector
By
Raj
SMTP
O Simple Mail Transfer Protocol (SMTP) is an
Internet standard for electronic mail (email)
transmission
O SMTP by default uses TCP port 25. The protocol
for mail submission is the same, but uses port 587.
O SMTP connections secured bySSL, known
as SMTPS, default to port 465
O Most e-mail systems that send mail over
the Internet use SMTP to send messages from one
server to another; the messages can then be
retrieved with an e-mail client using
either POP or IMAP. In addition, SMTP is generally
used to send messages from a mail client to a mail
server.
SMTP Transport
O Introduction
O The SMTP transport can be used for sending messages over SMTP
using the javax.mail API. The implementation supports
CC/BCC/ReplyTo addresses, attachments and custom Header
properties. It also provides support
for javax.mail.Messagetransformation. The SMTPS connector
enables SMTP over SSL using the javax.mail APIs. It supports all
the elements and attributes of the SMTP transport, plus some
required properties for setting up the client key store and the trust
store for the SSL connection.
O TLS/SSL connections are made on behalf of an entity, which can be
anonymous or identified by a certificate. The key store provides the
certificates and associated private keys necessary for identifying
the entity making the connection. Additionally, connections are
made to trusted systems. The public certificates of trusted systems
are stored in a trust store, which is used to verify that the
connection made to a remote system matches the expected identity.
Sample Flow
Flow Description
O Http component invokes the sample flow.
O Variable is used to set content of
attachment.
O Attachment is the file to be added to
email.
O Anything in Set Payload gets added to
message body.
O SMTP component is to configure and
send mail.
XML
O <?xml version="1.0" encoding="UTF-8"?>
O <mule xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
O xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0"
O xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
O xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
O http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
O http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
O http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd">
O <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"
basePath="sendmail"/>
O <smtp:gmail-connector name="Gmail" validateConnections="true" doc:name="Gmail"/>
O <flow name="email_sampleFlow">
O <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
O <set-variable variableName="attachmentString" value="This is an sample content of Attachment file........." doc:name="Variable"/>
O <set-attachment attachmentName="AttachmentFile.txt" value="#[flowVars.attachmentString]" contentType="text/plain"
doc:name="Attachment"/>
O <set-payload value="Hello --- This is Message Body" doc:name="Set Payload"/>
O <smtp:outbound-endpoint host="smtp.gmail.com" port="587" user=“sender%40gmail.com" password=“*******" connector-ref="Gmail"
to=“receiver@gmail.com" subject="Message Subject" responseTimeout="10000" doc:name="SMTP"/>
O </flow>
O </mule>
SMTP componet
Assumption
O The above example is done using Mule
3.6
O Gmail is used to send and receive mail
O Attachment component is used to attach
file
O Flow is tested and works in Mule 3.5.2
O SMTP details
O Host: smtp.gmail.com
O Port: 587
Reference
O https://docs.mulesoft.com/mule-user-
guide/v/3.5/smtp-transport-reference
O http://www.javaroots.com/
O Thank you

Contenu connexe

Tendances

Tendances (20)

Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Mule esb transformers
Mule esb transformersMule esb transformers
Mule esb transformers
 
Mule advanced
Mule advancedMule advanced
Mule advanced
 
Introduction To Mule
Introduction To MuleIntroduction To Mule
Introduction To Mule
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
File connector
File connectorFile connector
File connector
 
Mule concepts connectors
Mule concepts connectorsMule concepts connectors
Mule concepts connectors
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esb
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor component
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESB
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connector
 
Routing in mule
Routing in muleRouting in mule
Routing in mule
 
Mule esb whole_web_services
Mule esb whole_web_servicesMule esb whole_web_services
Mule esb whole_web_services
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in Mule
 
FTP Connector With Mule ESB
FTP Connector With Mule ESBFTP Connector With Mule ESB
FTP Connector With Mule ESB
 

Similaire à SMTP MULE

Explain how SSL protocol is used to ensure the confidentiality and int.docx
Explain how SSL protocol is used to ensure the confidentiality and int.docxExplain how SSL protocol is used to ensure the confidentiality and int.docx
Explain how SSL protocol is used to ensure the confidentiality and int.docx
todd401
 
10135 a 05
10135 a 0510135 a 05
10135 a 05
Bố Su
 

Similaire à SMTP MULE (20)

How to use smtp endpoint
How to use smtp endpointHow to use smtp endpoint
How to use smtp endpoint
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Email using mule
Email using muleEmail using mule
Email using mule
 
Taking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketTaking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocket
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
Lab08Email
Lab08EmailLab08Email
Lab08Email
 
Explain how SSL protocol is used to ensure the confidentiality and int.docx
Explain how SSL protocol is used to ensure the confidentiality and int.docxExplain how SSL protocol is used to ensure the confidentiality and int.docx
Explain how SSL protocol is used to ensure the confidentiality and int.docx
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
10135 a 05
10135 a 0510135 a 05
10135 a 05
 
Email configuration in mule esb
Email configuration in mule esbEmail configuration in mule esb
Email configuration in mule esb
 
Web Service
Web ServiceWeb Service
Web Service
 
SOAP Overview
SOAP OverviewSOAP Overview
SOAP Overview
 
application layer
application layerapplication layer
application layer
 
MuleSoft ESB XML to CSV
MuleSoft ESB XML to CSVMuleSoft ESB XML to CSV
MuleSoft ESB XML to CSV
 
MuleSoft ESB CSV to XML
MuleSoft ESB CSV to XMLMuleSoft ESB CSV to XML
MuleSoft ESB CSV to XML
 
E mail protocol - SMTP
E mail protocol - SMTPE mail protocol - SMTP
E mail protocol - SMTP
 
vishal_sharma: python email sending software
vishal_sharma: python email sending software  vishal_sharma: python email sending software
vishal_sharma: python email sending software
 
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLSMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 

SMTP MULE

  • 2. SMTP O Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (email) transmission O SMTP by default uses TCP port 25. The protocol for mail submission is the same, but uses port 587. O SMTP connections secured bySSL, known as SMTPS, default to port 465 O Most e-mail systems that send mail over the Internet use SMTP to send messages from one server to another; the messages can then be retrieved with an e-mail client using either POP or IMAP. In addition, SMTP is generally used to send messages from a mail client to a mail server.
  • 3. SMTP Transport O Introduction O The SMTP transport can be used for sending messages over SMTP using the javax.mail API. The implementation supports CC/BCC/ReplyTo addresses, attachments and custom Header properties. It also provides support for javax.mail.Messagetransformation. The SMTPS connector enables SMTP over SSL using the javax.mail APIs. It supports all the elements and attributes of the SMTP transport, plus some required properties for setting up the client key store and the trust store for the SSL connection. O TLS/SSL connections are made on behalf of an entity, which can be anonymous or identified by a certificate. The key store provides the certificates and associated private keys necessary for identifying the entity making the connection. Additionally, connections are made to trusted systems. The public certificates of trusted systems are stored in a trust store, which is used to verify that the connection made to a remote system matches the expected identity.
  • 5. Flow Description O Http component invokes the sample flow. O Variable is used to set content of attachment. O Attachment is the file to be added to email. O Anything in Set Payload gets added to message body. O SMTP component is to configure and send mail.
  • 6. XML O <?xml version="1.0" encoding="UTF-8"?> O <mule xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" O xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0" O xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" O xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd O http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd O http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd O http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd"> O <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration" basePath="sendmail"/> O <smtp:gmail-connector name="Gmail" validateConnections="true" doc:name="Gmail"/> O <flow name="email_sampleFlow"> O <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/> O <set-variable variableName="attachmentString" value="This is an sample content of Attachment file........." doc:name="Variable"/> O <set-attachment attachmentName="AttachmentFile.txt" value="#[flowVars.attachmentString]" contentType="text/plain" doc:name="Attachment"/> O <set-payload value="Hello --- This is Message Body" doc:name="Set Payload"/> O <smtp:outbound-endpoint host="smtp.gmail.com" port="587" user=“sender%40gmail.com" password=“*******" connector-ref="Gmail" to=“receiver@gmail.com" subject="Message Subject" responseTimeout="10000" doc:name="SMTP"/> O </flow> O </mule>
  • 8. Assumption O The above example is done using Mule 3.6 O Gmail is used to send and receive mail O Attachment component is used to attach file O Flow is tested and works in Mule 3.5.2 O SMTP details O Host: smtp.gmail.com O Port: 587