Email Functionality in Mule 4 | Send Email in Mule 4

Email Functionality in Mule 4

Email sending functionality in mule 4 is accomplished by send under email component.


Send component settings:


Connector configuration:

Advance settings:

In advance tab:
Put a property as:
Key: mail.smtp.starttls.enable
Value: true

Method: GET

One important thing is you might get critical security alert mail from google for sign in by some different device. for this you have to turn on less secure app access by link :

Now it is all set !!!....Hit the URL and you will get the mail in your inbox.

XML Project code:

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="" xmlns:email=""
     xmlns:doc="" xmlns:xsi="" xsi:schemaLocation="">
     <http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="00e4ba9f-b70b-4fec-911a-869f91a67a0f" >
          <http:listener-connection host="" port="8085" />
     <email:smtp-config name="Email_SMTP" doc:name="Email SMTP" doc:id="50713db3-050f-4a67-b2d9-142b2b6ac8d3" >
          <email:smtp-connection host="" port="587" user="" password="" >
              <email:properties >
                   <email:property key="mail.smtp.starttls.enable" value="true" />
     <email:imap-config name="Email_IMAP" doc:name="Email IMAP" doc:id="25b8bba2-5949-4d9b-92f9-852b36abf161" >
          <email:imap-connection host="" port="587" user="" password="" >
              <email:properties >
                   <email:property key="mail.smtp.starttls.enable" value="true" />
     <flow name="test_emailFlow" doc:id="3ce7ecb5-d649-4774-b1cb-b297ec882519" >
          <http:listener doc:name="Listener" doc:id="f5150eac-056b-4655-901c-c2ec8022b8b5" config-ref="HTTP_Listener_config" path="/send"/>
          <email:send doc:name="Send" doc:id="c73ad1de-d0dd-4be7-9373-cfe6d852c896" config-ref="Email_SMTP" fromAddress="" subject="hello">
              <email:to-addresses >
                   <email:to-address value="" />
              <email:body contentType="text/plain">

© 2020

Share on :

Mule 4:

XML to JSON in mule 4 Web service consumer VM Validation in Mule 4 Until Successful
Sub flow Set Variable & Remove Variable Set Transaction ID Scatter Gather Round Robin
Consume Restful Service CRUD in Mule 4 Parse Template Object to JSON Load Static Resource
JSON to XML Invoke Idempotent Filter ForEach Flat file to JSON
Fixwidth to JSON First Successful File Execute Error Handling
Email Dynamic Evaluate Custom Business Event CSV to JSON Copybook to JSON
Choice Router Async RabbitMQ

Mule 3:

Database Connector Async CXF Attachement XSLT
Mongo DB Cache scope Custom Business Event Gzip Compress Expression
SMTP For Each Expression Javascript Filter Reference
Salesforce Message Enricher Groovy Parse Template Idempotent
VM Poll Invoke Ruby Message
Webservice consumer Python Transformer reference Message Property Not
Collection Aggregator First Sucessful Catch Exception Strategy Reference Exception Strategy Or
Choice Message Chunk Aggregator Choice Exception Strategy Global Exception Strategy Schema Validation
Custom Aggregator Scatter Gather Custom Exception Strategy Batch Processing MEL
M Unit RAML Map Operator API Mocking Dataweave