Hi Eric,

I replicated the DNSBounce to send custom bounce with postmaster..

I am able to send / receive the postmaster message, but I am unable
see any body message in it.

I am using mysql and in the "james_mail.mail_bytes" field all I am
seeing is empty blob and when I try to open that mail in squirrel mail
its giving me the imap error.


My class is exact the DNSBounce.java except for few conditions when to
send the bounce mail.

MailImpl newMail = new MailImpl(mail);
newMail.setRemoteAddr(dns.getLocalHost().getHostName());
newMail.setRemoteHost(dns.getLocalHost().getHostAddress());
MailAddress reversePath = mail.getSender();
Collection<MailAddress> newRecipients = new HashSet<MailAddress>();
newRecipients.add(reversePath);
newMail.setRecipients(newRecipients);
MimeMessage newMessage = new
MimeMessage(Session.getDefaultInstance(System.getProperties(), null));
MimeMultipartReport multipart = new MimeMultipartReport();
multipart.setReportType("delivery-status");
MimeBodyPart part1 = new MimeBodyPart();
part1.setText(messageString); // message from this part is missing in
the mail body.
multipart.addBodyPart(part1);
newMessage.setHeader(RFC2822Headers.CONTENT_TYPE, multipart.getContentType());
newMessage.setContent(multipart);
newMail.setMessage(newMessage);
setRecipients(newMail, getRecipients(mail), mail);
setTo(newMail, getTo(mail), mail);
setSubjectPrefix(newMail, getSubjectPrefix(mail), mail);
newMail.getMessage().setHeader(RFC2822Headers.DATE,
rfc822DateFormat.format(new Date()));
setReplyTo(newMail, getReplyTo(mail), mail);
setReversePath(newMail, getReversePath(mail), mail);
setSender(newMail, getSender(mail), mail);
setIsReply(newMail, isReply(mail), mail);
newMail.getMessage().saveChanges();
getMailetContext().sendMail(newMail);


Please suggest me what is causing the body message part to be missing
from the mail send.

Appreciate your help.

Thank you,
Regards,
Rajender

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to