Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created October 16, 2011 00:47
Show Gist options
  • Save terrancesnyder/1290371 to your computer and use it in GitHub Desktop.
Save terrancesnyder/1290371 to your computer and use it in GitHub Desktop.
Mule Email Listener
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:pop3s="http://www.mulesoft.org/schema/mule/pop3s"
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.mulesoft.org/schema/mule/pop3s http://www.mulesoft.org/schema/mule/pop3s/3.1/mule-pop3s.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd ">
<pop3s:connector name="e2spop3Connector" checkFrequency="30000" deleteReadMessages="false" />
<flow name="jmsFlow1">
<pop3s:inbound-endpoint host="pop.gmail.com"
port="995" user="xxxx%40gmail.com" password="xxxx"
responseTimeout="10000" encoding="UTF-8" disableTransportTransformer="false"
doc:name="POP3"
doc:description="The POP3S transport is similar to the [POP3 Transport] but uses secure connections over SSL/TLS." />
<logger message="'#[header:OUTBOUND:Subject]'" level="INFO"
doc:name="Logger"
doc:description="Performs logging using an expression that determines what should be logged." />
<message-property-filter pattern="Subject=*Scenario*"
caseSensitive="false" scope="outbound" doc:name="Filter on Subject"
doc:description="A filter that matches properties on a message." />
<logger message="^__^" level="INFO" doc:name="Logger"
doc:description="Performs logging using an expression that determines what should be logged." />
</flow>
</mule>
@terrancesnyder
Copy link
Author

Listens to email on pop3 and will process a message when the subject contains the text Scenario (in any case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment