You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by reseal05 <re...@citi.com> on 2014/04/25 19:43:37 UTC

Problem sending email through routing, in Apache's Report Incident tutorial

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.