SlideShare a Scribd company logo
By Anirban Sen Chowdhary
Have you ever wondered you can send mail from Mule application with
attachment
Sending mail with attachment
Yes .. We can .. I will show you this trick .. How ??
We need attachment component in Mule to attach any files with
current payload
Let us we have following Mule flow:-
Here you can see we are using Groovy component to design the email body content
in HTML format and that is followed by the Attachment component which will attach
a file with the current message payload and will be send as a mail by the SMTP
component
The corresponding Mule flow will be as follows:-
You can see here Groovy component has designed the payload in HTML content and
Attachment component has picked the file1.txt from it’s location and finally both the
content and the attachment is send as mail by SMTP component
Now we will be hitting our url http://localhost:8081/attachment on the browser
to start the flow and we will get the following on log :-
You can see in the log that email has been dispatched
We will be checking our mail box and will find the following :-
You can see the mail has arrived 
If you open the mail, you will find the content of the mail is designed in HTML
format and the mail contains the attachment
In my next slide I will bring some other techniques in Mule
implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow 
Sending mail with attachment

More Related Content

PPTX
Mule with velocity
PPTX
Idempotent filter in mule
PPTX
Idempotent filter in Mule
 
PPTX
Getting anypoint studios all versions
PPTX
Mule message enricher
PPTX
Mule velocity
PPTX
Running mule standalone
PPTX
Mule soap
Mule with velocity
Idempotent filter in mule
Idempotent filter in Mule
 
Getting anypoint studios all versions
Mule message enricher
Mule velocity
Running mule standalone
Mule soap

What's hot (15)

PPTX
Velocity in Mule
PPTX
Scatter and gather in mule
PPTX
Using spring task scheduler in java in mule
PPTX
Web application with mule
PPTX
Timer Interceptor in Mule
PPTX
Mule
PPTX
Using ajax in mule
PPTX
Deploying and running in mule standalone
PPTX
Mule esb - How to connect to a MySql Database in 5 minutes
PPTX
Mule management console installation with Tomcat
PPTX
Deploying and running mule standalone
PPTX
Spicing your mule response
PPTX
Demo on Mule ESB Facebook Connector
PPTX
Deploying and Running in Mule
PPTX
Setting filedynamically
Velocity in Mule
Scatter and gather in mule
Using spring task scheduler in java in mule
Web application with mule
Timer Interceptor in Mule
Mule
Using ajax in mule
Deploying and running in mule standalone
Mule esb - How to connect to a MySql Database in 5 minutes
Mule management console installation with Tomcat
Deploying and running mule standalone
Spicing your mule response
Demo on Mule ESB Facebook Connector
Deploying and Running in Mule
Setting filedynamically
Ad

Viewers also liked (20)

PPTX
Mule with drools
PPTX
Parameters as a part of body
PPTX
Automatic documentation with mule
PPTX
Mule accessing multiple database in parallel
PPTX
Mule with quartz
PPTX
Mule with rabbitmq
PPTX
Combing xml in Mule
PPTX
Delaying jms with mule
PPTX
Sharing resources with mule
PPTX
Mule dynamic name space
PPTX
Scatter gather in mule
PPTX
Splitting with mule part2
PPTX
Calling flow from another application
PPTX
Mapping and listing with mule
PPTX
Process file one after another
PPTX
Dynamic file attribute
PPTX
Accessing jms in mule using groovy
PPTX
Running mule from java
PPTX
Calling flow from another application 2
PPTX
Xml to xml transformation in mule
Mule with drools
Parameters as a part of body
Automatic documentation with mule
Mule accessing multiple database in parallel
Mule with quartz
Mule with rabbitmq
Combing xml in Mule
Delaying jms with mule
Sharing resources with mule
Mule dynamic name space
Scatter gather in mule
Splitting with mule part2
Calling flow from another application
Mapping and listing with mule
Process file one after another
Dynamic file attribute
Accessing jms in mule using groovy
Running mule from java
Calling flow from another application 2
Xml to xml transformation in mule
Ad

Similar to Sending mail with attachment (20)

PPTX
Sending mail in mule
PPTX
Mule with velocity
PPTX
Mule with velocity
PPTX
Mule with velocity
PPTX
Mule with velocity
PPTX
Mule with velocity
PPTX
Mule with velocity
PPTX
Mule with velocity
PPTX
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
PPTX
Example esb file-to-string flow
PPTX
Composite source in bound and out-bound
PPTX
Input and output flow with logger component
PPTX
Input and output flow using file to string and logger component
PPTX
Mule esb lesson 3
PPTX
Mule with composite source
PPTX
Idempotent filter with simple file
PPTX
Handle File on mule
PPTX
Deploy apps in standalone with maven
DOCX
From Inbox to Intranet: Automate SharePoint News Posts in Real-Time
PPTX
Idempotent filter with simple file
Sending mail in mule
Mule with velocity
Mule with velocity
Mule with velocity
Mule with velocity
Mule with velocity
Mule with velocity
Mule with velocity
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
Example esb file-to-string flow
Composite source in bound and out-bound
Input and output flow with logger component
Input and output flow using file to string and logger component
Mule esb lesson 3
Mule with composite source
Idempotent filter with simple file
Handle File on mule
Deploy apps in standalone with maven
From Inbox to Intranet: Automate SharePoint News Posts in Real-Time
Idempotent filter with simple file

More from Anirban Sen Chowdhary (20)

PPTX
Change the game with Game changer
PPTX
Ring central desktop app overview
PPTX
Overview in ringcentral digital line
PPTX
Some basics with ring central
PPTX
Ring central and python
PPTX
RingCentral application development overview
PPTX
Cloze connect ringcentral
PPTX
Overview on ring central errors part 4
PPTX
Setting up your ring central sandbox in steps
PPTX
Overview on ring central errors: part 2
PPTX
Overview on ring central errors
PPTX
Call recording overview ring central
PPTX
Ring central engaging with amazon alexa
PPTX
How ring central sdk changing the game
PPTX
When ring central connect salesforce
PPTX
Mule 4 connecting ring central
PPTX
Ring central sdk
PPTX
Ring central with okta
PPTX
Ring central connecting salesforce overview
PPTX
Ring central call logs overview (part 2)
Change the game with Game changer
Ring central desktop app overview
Overview in ringcentral digital line
Some basics with ring central
Ring central and python
RingCentral application development overview
Cloze connect ringcentral
Overview on ring central errors part 4
Setting up your ring central sandbox in steps
Overview on ring central errors: part 2
Overview on ring central errors
Call recording overview ring central
Ring central engaging with amazon alexa
How ring central sdk changing the game
When ring central connect salesforce
Mule 4 connecting ring central
Ring central sdk
Ring central with okta
Ring central connecting salesforce overview
Ring central call logs overview (part 2)

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
KodekX | Application Modernization Development
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
KodekX | Application Modernization Development
Teaching material agriculture food technology
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
sap open course for s4hana steps from ECC to s4
Advanced methodologies resolving dimensionality complications for autism neur...

Sending mail with attachment

  • 1. By Anirban Sen Chowdhary
  • 2. Have you ever wondered you can send mail from Mule application with attachment
  • 4. Yes .. We can .. I will show you this trick .. How ??
  • 5. We need attachment component in Mule to attach any files with current payload
  • 6. Let us we have following Mule flow:- Here you can see we are using Groovy component to design the email body content in HTML format and that is followed by the Attachment component which will attach a file with the current message payload and will be send as a mail by the SMTP component
  • 7. The corresponding Mule flow will be as follows:- You can see here Groovy component has designed the payload in HTML content and Attachment component has picked the file1.txt from it’s location and finally both the content and the attachment is send as mail by SMTP component
  • 8. Now we will be hitting our url http://localhost:8081/attachment on the browser to start the flow and we will get the following on log :- You can see in the log that email has been dispatched
  • 9. We will be checking our mail box and will find the following :- You can see the mail has arrived 
  • 10. If you open the mail, you will find the content of the mail is designed in HTML format and the mail contains the attachment
  • 11. In my next slide I will bring some other techniques in Mule implementation . Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow 