The MAIL component enables sending emails. Learn how to use the MAIL component.


To install camel-mail you can use the managed libraries or manually upload the library jars with their dependencies.


Now it's possible to create a route that uses this component. Here is the definition of the route:

<routes xmlns="" xmlns:u="">
        <from uri="timer:foo?repeatCount=1"/>
        <!-- The subject is stored in a header -->
        <setHeader name="subject">
            <constant>Very important message</constant>
        <!-- The recipient is also in a header -->
        <setHeader name="to">
        <!-- The message of the email is the body -->
            <constant>This is an important message</constant>
        <!-- Send the email -->
        <to uri="smtps://{{smtpUser}}&amp;password={{smtpP@ssword}}"/>

Related Links