SlideShare a Scribd company logo
1 of 8
How to use SMTP endpoint
16-05-2015
Abstract
• The main motto of this PPT is How to use
SMTP endpoint in our applications.
Introduction
• The SMTP transport can be used for sending
messages over SMTP using thejavax.mail API. The
implementation supports CC/BCC/ReplyTo
addresses, attachments and custom Header
properties. It also provides support
forjavax.mail.Message transformation. 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.
Example
.mflow
• <?xml version="1.0" encoding="UTF-8"?>
• <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"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-current.xsd
• http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
• http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
• http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-
smtp.xsd">
• <smtp:gmail-connector name="Gmail" validateConnections="true" doc:name="Gmail"/>
• <flow name="SMTPFlow1" doc:name="SMTPFlow1">
• <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="smtp"
doc:name="HTTP"/>
• <logger message="--Entered into the flow" level="INFO" doc:name="Logger"/>
• <set-payload value="Hai Friend" doc:name="Set Payload"/>
• <smtp:outbound-endpoint host="smtp.gmail.com" port="587" user=“****%40gmail.com" password=“****"
to=“****@gmail.com" from=“****@gmail.com" subject="Hai" responseTimeout="10000" connector-ref="Gmail"
doc:name="SMTP"/>
• </flow>
• </mule>
• Output:
• Email will come to your inbox
• Flow of execution:
1. URL to trigger the service from browser
http://localhost:8087/smtp
2. Email will come to to-email address with the
payload in set-payload component as body and
subject in the SMTP component as mail subject
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.7/smtp-transport-reference

More Related Content

What's hot

Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in muleRajkattamuri
 
File component in mule
File component in muleFile component in mule
File component in muleRajkattamuri
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routerssathyaraj Anand
 
Until successful component in mule demo
Until successful component in mule demoUntil successful component in mule demo
Until successful component in mule demoSudha Ch
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demoSudha Ch
 
Mule esb
Mule esbMule esb
Mule esbKhan625
 
Database component in mule
Database component in muleDatabase component in mule
Database component in muleRajkattamuri
 
Mule concepts connectors
Mule concepts connectorsMule concepts connectors
Mule concepts connectorskunal vishe
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mulejaveed_mhd
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each componentprudhvivreddy
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule Rajkattamuri
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esbKhasim Cise
 

What's hot (17)

Using XSLT in Mule
Using XSLT in MuleUsing XSLT in Mule
Using XSLT in Mule
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
Configurare http mule
Configurare http muleConfigurare http mule
Configurare http mule
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Mule property placeholder
Mule property placeholderMule property placeholder
Mule property placeholder
 
Until successful component in mule demo
Until successful component in mule demoUntil successful component in mule demo
Until successful component in mule demo
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demo
 
Mule esb
Mule esbMule esb
Mule esb
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Mule concepts connectors
Mule concepts connectorsMule concepts connectors
Mule concepts connectors
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esb
 

Viewers also liked (20)

Validate json schema
Validate json schemaValidate json schema
Validate json schema
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
How to use composite source
How to use composite sourceHow to use composite source
How to use composite source
 
Bean as Datasource
Bean as DatasourceBean as Datasource
Bean as Datasource
 
How to use poll scope
How to use poll scopeHow to use poll scope
How to use poll scope
 
Splitter
SplitterSplitter
Splitter
 
How to use IMAP endpoint
How to use IMAP endpointHow to use IMAP endpoint
How to use IMAP endpoint
 
Not Filter
Not FilterNot Filter
Not Filter
 
How to use jms outbound endpoint
How to use jms outbound endpointHow to use jms outbound endpoint
How to use jms outbound endpoint
 
Dockerizing mule soft esb
Dockerizing mule soft esbDockerizing mule soft esb
Dockerizing mule soft esb
 
Cloud hub deployment
Cloud hub deploymentCloud hub deployment
Cloud hub deployment
 
Integrate mule esb with microsoft office 365 share point
Integrate mule esb with microsoft office 365 share pointIntegrate mule esb with microsoft office 365 share point
Integrate mule esb with microsoft office 365 share point
 
Securing api with_o_auth2
Securing api with_o_auth2Securing api with_o_auth2
Securing api with_o_auth2
 
How to use parse template
How to use parse templateHow to use parse template
How to use parse template
 
How to read json message payload
How to read json message payloadHow to read json message payload
How to read json message payload
 
How to use message enricher
How to use message enricherHow to use message enricher
How to use message enricher
 
How to use attachment transformer
How to use attachment transformerHow to use attachment transformer
How to use attachment transformer
 
Sap
SapSap
Sap
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
 
How to use web service consumer
How to use web service consumerHow to use web service consumer
How to use web service consumer
 

Similar to How to use smtp endpoint

Message properties component
Message properties component Message properties component
Message properties component Sunil Komarapu
 
Message properties component
Message properties componentMessage properties component
Message properties componentF K
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmaheshtheapex
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentprinceirfancivil
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentirfan1008
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentPhaniu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmdfkhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentSunil Komarapu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentKhasim Saheb
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in MuleKhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentAnand kalla
 
Until successful component
Until successful component Until successful component
Until successful component Sunil Komarapu
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in muleF K
 
How to use until successful component
How to use until successful componentHow to use until successful component
How to use until successful componentmaheshtheapex
 
How to use cache scope component
How to use cache scope componentHow to use cache scope component
How to use cache scope componentprathyusha vadla
 
How to use salesforce cloud connector
How to use salesforce cloud connectorHow to use salesforce cloud connector
How to use salesforce cloud connectorRaviRajuRamaKrishna
 

Similar to How to use smtp endpoint (20)

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
 
SMTP MULE
SMTP  MULESMTP  MULE
SMTP MULE
 
Message properties component
Message properties component Message properties component
Message properties component
 
Message properties component
Message properties componentMessage properties component
Message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Until Successful Component
Until Successful ComponentUntil Successful Component
Until Successful Component
 
Until successful component
Until successful component Until successful component
Until successful component
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
How to use until successful component
How to use until successful componentHow to use until successful component
How to use until successful component
 
How to use cache scope component
How to use cache scope componentHow to use cache scope component
How to use cache scope component
 
How to use salesforce cloud connector
How to use salesforce cloud connectorHow to use salesforce cloud connector
How to use salesforce cloud connector
 

More from sivachandra mandalapu (20)

Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
 
Jms selector
Jms selectorJms selector
Jms selector
 
Sftplite
SftpliteSftplite
Sftplite
 
Object store
Object storeObject store
Object store
 
How to use SFTP
How to use SFTPHow to use SFTP
How to use SFTP
 
How to use secure property placeholder
How to use secure property placeholderHow to use secure property placeholder
How to use secure property placeholder
 
Defining global exception strategies
Defining global exception strategiesDefining global exception strategies
Defining global exception strategies
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
 
Validation
ValidationValidation
Validation
 
Property place holder
Property place holderProperty place holder
Property place holder
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applications
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api access
 
API gateway setup
API gateway setupAPI gateway setup
API gateway setup
 
Expression
ExpressionExpression
Expression
 
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
 
Salesforce
SalesforceSalesforce
Salesforce
 
Data Mapper
Data MapperData Mapper
Data Mapper
 
Wildcard Filter
Wildcard FilterWildcard Filter
Wildcard Filter
 
Soap Component
Soap ComponentSoap Component
Soap Component
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

How to use smtp endpoint

  • 1. How to use SMTP endpoint 16-05-2015
  • 2. Abstract • The main motto of this PPT is How to use SMTP endpoint in our applications.
  • 3. Introduction • The SMTP transport can be used for sending messages over SMTP using thejavax.mail API. The implementation supports CC/BCC/ReplyTo addresses, attachments and custom Header properties. It also provides support forjavax.mail.Message transformation. 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.
  • 5. .mflow • <?xml version="1.0" encoding="UTF-8"?> • <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" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd • http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd • http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule- smtp.xsd"> • <smtp:gmail-connector name="Gmail" validateConnections="true" doc:name="Gmail"/> • <flow name="SMTPFlow1" doc:name="SMTPFlow1"> • <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="smtp" doc:name="HTTP"/> • <logger message="--Entered into the flow" level="INFO" doc:name="Logger"/> • <set-payload value="Hai Friend" doc:name="Set Payload"/> • <smtp:outbound-endpoint host="smtp.gmail.com" port="587" user=“****%40gmail.com" password=“****" to=“****@gmail.com" from=“****@gmail.com" subject="Hai" responseTimeout="10000" connector-ref="Gmail" doc:name="SMTP"/> • </flow> • </mule>
  • 6. • Output: • Email will come to your inbox
  • 7. • Flow of execution: 1. URL to trigger the service from browser http://localhost:8087/smtp 2. Email will come to to-email address with the payload in set-payload component as body and subject in the SMTP component as mail subject