Mais conteúdo relacionado Semelhante a Mule smtp connector (20) Mais de Krishnakanth Goud (11) Mule smtp connector1. Mule SMTP Connector
This tutorial explains about the Mule SMTP
connector configuration. This can be used to send
emails.
Pre-requisites:
1. Anypoint Studio 5.1.0
2. Any email smtp connection details like yahoo
3. Set message as payload (i.e. Test Message).
This will be the email message.
5. Source code:
<http:listener-config name="HTTP_Listener_Configuration"
host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration" />
<flow name="yahooemailFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/" doc:name="HTTP" />
<set-payload value="#['Test Message ']" doc:name="Set Payload" />
<smtps:outbound-endpoint host="${smtp_host_ip}"
responseTimeout="10000" doc:name="SMTP" from="fromemail@yahoo.com"
mimeType="text/html" password="password" subject="subject"
to="toemail@yahoo.com" user="fromemail%40yahoo.com" />
<logger message="Mail Sent #[payload]" level="INFO" doc:name="Logger" />
</flow>
6. Source code:
<http:listener-config name="HTTP_Listener_Configuration"
host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration" />
<flow name="yahooemailFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/" doc:name="HTTP" />
<set-payload value="#['Test Message ']" doc:name="Set Payload" />
<smtps:outbound-endpoint host="${smtp_host_ip}"
responseTimeout="10000" doc:name="SMTP" from="fromemail@yahoo.com"
mimeType="text/html" password="password" subject="subject"
to="toemail@yahoo.com" user="fromemail%40yahoo.com" />
<logger message="Mail Sent #[payload]" level="INFO" doc:name="Logger" />
</flow>