11
Using SMTP in Mule By Anirban Sen Chowdhary

Using smtp in mule

Embed Size (px)

Citation preview

Page 1: Using smtp in mule

Using SMTP in MuleBy Anirban Sen Chowdhary

Page 2: Using smtp in mule

We often have requirement to send emails through our application.We can send mails from our Mule application very easily.

Page 3: Using smtp in mule

So, how can we mail from Mule ????

?

Page 4: Using smtp in mule

We can configure SMTP component in Mule to send mail easily

Page 5: Using smtp in mule

This is how it works :-

Mule Application Mail Client

Page 6: Using smtp in mule

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

Page 7: Using smtp in mule

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.

Page 8: Using smtp in mule

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

Page 9: Using smtp in mule

You can check your mail, you will get your mail in your mailbox :-

Page 10: Using smtp in mule

In my next slide I will bring some other techniques in Mule implementation .Hope you have enjoyed this simpler version. 

Page 11: Using smtp in mule

Thank You