This doesn't work.
Map map = new HashMap();
map.put("To", "[EMAIL PROTECTED]");
map.put("From", "[EMAIL PROTECTED]");
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", "[EMAIL PROTECTED]");
map.put("From", "[EMAIL PROTECTED]");
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://[EMAIL PROTECTED]",
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.

Reply via email to