camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reseal05 <rebecca.seal...@citi.com>
Subject Problem sending email through routing, in Apache's Report Incident tutorial
Date Fri, 25 Apr 2014 17:43:37 GMT
I am trying to write an Apache Camel route for sending email to myself:
from("file://target/subfolder")
.setHeader("subject", constant("new incident reported"))
.convertBodyTo(String.class)
// send the email
.to("smtp://myID@localhost?password=&to=myname@mycompany.com");

But I'm getting this, and no email in my inbox:
395  [main] DEBUG org.apache.camel.example.reportincident.
ReportIncidentRoutesTest  - Routing Rules are:
[EventDrivenConsumerRoute[Endpoint[direct:start] ->
Delegate(Delegate(Pipeline[DeadLetterChannel[Delegate(setHeader(org.apache.
camel.file.name, BeanExpression[bean:org.apache.camel.example.reportincident.
FilenameGenerator@244aeb52 method: generateFilename])),
RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]],
DeadLetterChannel[Delegate(sendTo(Endpoint[velocity:MailBody.vm])),
RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]],
DeadLetterChannel[Delegate(sendTo(Endpoint[file://target/subfolder])),
RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]]]))],
EventDrivenConsumerRoute[Endpoint[file://target/subfolder] ->
Delegate(Delegate(Pipeline[DeadLetterChannel[Delegate(setHeader(To,
myname@mycompany.com)), RecipientList[log:org.apache.camel.DeadLetterChannel?
level=error]], DeadLetterChannel[Delegate(setHeader(subject, new incident
reported)), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]],
DeadLetterChannel[Delegate(org.apache.camel.processor.
ConvertBodyProcessor@6e79839),
RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]],
DeadLetterChannel[Delegate(sendTo(Endpoint[smtp://myID@localhost?
password=&to=myname@mycompany.com])),
RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]]]))]]

I'm not sure why the email is going to DeadLetterChannel, or how I can fix this problem. 
The code is based on Part 4 of the Apache Camel tutorial: https://camel.apache.org/tutorial-example-reportincident-part4.html.
 I was able to receive the email I sent in Part 3 of the tutorial, using the same SMTP string,
but now that I've rewritten the route I am not sure what is going on.  Thanks, any help is
greatly appreciated.




--
View this message in context: http://camel.465427.n5.nabble.com/Problem-sending-email-through-routing-in-Apache-s-Report-Incident-tutorial-tp5750623.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message