Skip to content

Instantly share code, notes, and snippets.

@kianting
Last active August 8, 2017 00:05
Show Gist options
  • Save kianting/f6c525be34357c05bcf7c30cfb43846a to your computer and use it in GitHub Desktop.
Save kianting/f6c525be34357c05bcf7c30cfb43846a to your computer and use it in GitHub Desktop.
MuleSoft Send SMTP E-mail
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<smtp:connector name="SMTP" contentType="text/html" validateConnections="true" doc:name="SMTP"/>
<flow name="sendemailtestFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/send" doc:name="HTTP"/>
<smtp:outbound-endpoint host="smtp-mail.outlook.com" port="587" user="rammsappworkorder@outlook.com" password="mulesoft2017" connector-ref="SMTP" to="john.doe@gmail.com" from="rammsappworkorder@outlook.com" subject="Testing Email " cc="john.doe@gmail.com@ccc.govt.nz" responseTimeout="10000" doc:name="SMTP" mimeType="text/html">
<property key="mail.smtp.starttls.enable" value="true"/>
</smtp:outbound-endpoint>
<logger message="#[message]" level="INFO" doc:name="Logger"/>
<catch-exception-strategy doc:name="sendemailtestCatch_Exception_Strategy">
<logger message="#[exception.printStackTrace()]" level="INFO" doc:name="Logger"/>
</catch-exception-strategy>
</flow>
</mule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment