Upload
anirban-sen-chowdhary
View
146
Download
2
Embed Size (px)
Citation preview
Using SMTP in MuleBy Anirban Sen Chowdhary
We often have requirement to send emails through our application.We can send mails from our Mule application very easily.
So, how can we mail from Mule ????
?
We can configure SMTP component in Mule to send mail easily
This is how it works :-
Mule Application Mail Client
Let’s create a simple flow to send mail:-
As we can see, we have used Http inbound endpoint to trigger the flow and SMTP out bound will dispatched the mail to our email address
Our Mule flow will be :-
Just remember to add a Gmail connector at the top and in SMTP outbound you can see the user attribute should have parsed mail id.. For example if your mail id is [email protected] , you should write here abc%40gmail.com. That’s how it works here.
To test the application, if we hit the url http://localhost:8081/mail , we will get in our log :-
You can see in logs the mail has been send
You can check your mail, you will get your mail in your mailbox :-
In my next slide I will bring some other techniques in Mule implementation .Hope you have enjoyed this simpler version.
Thank You