We have been trying to send emails from within an email using the
javax.mail package. But, James keeps intercepting the message even
though it is destined for another mail server.

Here is a code snippet.


Session mailSession = Session.getDefaultInstance(mailConfig, null);
                MimeMessage msg = new MimeMessage(mailSession);
                msg.setFrom(new
InternetAddress(this.mailConfig.getProperty("mail.from")));
                msg.setRecipients(Message.RecipientType.TO,
message.getFrom());
                msg.setSubject("Account Creation");
                msg.setContent(or.getMessage(), "text/plain");
                Transport trans =
mailSession.getTransport(message.getFrom()[0]);
 
trans.connect(this.getMailetConfig().getInitParameter("mailHost"),
"username", "password");
Transport.send(msg);
trans.close();

The code works when I run it outside JAMES. So my question is how do I,
get JAMES to stop spooling any emails that I create and send from inside
a mailet.
Sujit

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to