Results 1 to 1 of 1
- 10-28-2009, 11:31 AM #1Member
- Join Date
- Oct 2009
- Rep Power
Accessing custom email headers in bounced back emails
I have a requirement like this.
I have a program which sends out huge number of emails to customers using java API.
The code snippet is like below
Session session = Session.getDefaultInstance(properties, null);
MimeMessage msg = new MimeMessage(session);
msg.setRecipients(javax.mail.Message.RecipientType .TO, toAddress);
Here I am setting a custom header before sending a mail to the customer.
I am able to get/read this custom header field "user-id" by using pop3 protocol when a mail is sent to a valid email address.
However when the email was sent to an invalid email address the bounce back email doesn't have this custom header field "user-id".
I need this information because I have to update my database that the email address for this particular user-id has bounced.
Is there any thing we can do at the code level to read the custom headers? Or do we have to configure some thing at the mail server level to retain these custom headers in bounced back emails.
Please help me how to achieve this.
Thanks in advance
- By Nicole in forum Advanced JavaReplies: 6Last Post: 03-31-2009, 12:36 AM
- By rrkumar in forum Advanced JavaReplies: 0Last Post: 10-15-2008, 03:14 PM
- By jnamendi in forum JavaServer Faces (JSF)Replies: 0Last Post: 10-14-2008, 05:55 PM
- By marco in forum Java AppletsReplies: 1Last Post: 08-15-2007, 11:02 PM