camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HockeyDave <david_peterson4...@yahoo.com>
Subject camel-mail bug 1.4.0 smtp mail relay
Date Fri, 24 Oct 2008 21:26:58 GMT

This doesn't work.
Map map = new HashMap();
map.put("To", "davsclaus@apache.org");
map.put("From", "jstrachan@apache.org");
map.put("Subject", "Camel rocks");

String body = "Hello Claus.\nYes it does.\n\nRegards James.";
// Note, no user here because it's a relay server and doesn't require auth
for internal relay
template.sendBodyAndHeaders("smtp://mailserver.apache.org", body, map);

Get a NullPointerException.  

But this does work:

Map map = new HashMap();
//map.put("To", "davsclaus@apache.org");
map.put("From", "jstrachan@apache.org");
map.put("Subject", "Camel rocks");

String body = "Hello Claus.\nYes it does.\n\nRegards James.";
// Note the to address in the URI
template.sendBodyAndHeaders("smtp://mailserver.apache.org?to=davsclaus@apache.org",
body, map);
-- 
View this message in context: http://www.nabble.com/camel-mail-bug-1.4.0-smtp-mail-relay-tp20157632s22882p20157632.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message