What is Mule ESB ?
Mule ESB is a lightweight Java-based enterprise service bus (ESB) and integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data. Mule ESB enables easy integration of existing systems, regardless of the different technologies that the applications use, including JMS, Web Services, JDBC, HTTP, and more.
This example shows how we can send email attachment using SMTP connector to self or another email. We simply put a file in a source directory and Mule will read the file from the source directory. Using Mule ESB it’s very easy to read the file from a location. If we had to read the file using manual coding then we had to write many lines of code. But using Mule ESB we just simply put a file in a directory and let the Mule know the file path and Mule does the rest of the thing. You can put any kind of file to the source for reading. The file that we put into a source directory will be an attachment to the intended recipient’s mail address. So finally when we will see the file as an attachment in the mailbox.
Continue reading “Send email attachment using SMTP in Mule ESB”
This tutorial shows how do we send email with attachment. This tutorial uses one input form where a user gives input for ‘Email To Address’ where the intended email will be sent, ‘Email Subject’, ‘Email Message’ and uploads one file which will be sent as an attachment with the email. This email sending example uses only gmail smtp server to send the mail. If you need only file upload example then you can search in the search box you will get file upload examples in Struts2, JSF2, Codeigniter2.
For testing purpose you can also send the email to yourself and after sending open your mailbox, you will find an email has arrived.
Continue reading “Sending Email with attachment using Struts2”