Contact Us 1-800-596-4880

Email Transport Reference

Introduction

The email transport comprises of several transports for email connectivity. The implementation supports CC/BCC/ReplyTo addresses, attachments, custom Header properties and customizable authentication. See each email transport page for more details.

Configuration Examples

Here is a configuration snippet from the bookstore example. This flow is triggered when you send a string to vm://emailNotification and sends an order verification email to a specified address:

<flow name="EmailNotificationService">
    <vm:inbound-endpoint path="emailNotification" exchange-pattern="one-way" />
    <smtps:outbound-endpoint user="${user}" password="${password}" host="${host}" from="${from}"
                             subject="Your order has been placed!">
        <custom-transformer class="org.mule.example.bookstore.transformers.OrderToEmailTransformer" />
        <email:string-to-email-transformer />
    </smtps:outbound-endpoint>
</flow>

Here is a configuration snippet from the errorhandler example. This endpoint takes a ErrorMessageToExceptionBean java object and converts it to an email to a specified address:

<smtp:outbound-endpoint user="${smtp.username}" password="${smtp.password}"
                        host="${smtp.host}" port="${smtp.port}"
                        to="${email.toAddress}" from="${email.fromAddress}"
                        subject="${email.subject}">
    <transformer ref="ErrorMessageToExceptionBean" />
    <transformer ref="ExceptionBeanToXML" />
    <email:string-to-email-transformer/>
</smtp:outbound-endpoint>

You can find full working configuration examples in each transport reference page.