Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Mail question

Status
Not open for further replies.

vulcand4

Programmer
Jul 29, 2003
76
US
Does anyone know if it is possible to specify a "dead letter" address in Java Mail?

I need to be able to track emails that are undeliverable and so I need to specify some sort of return mail address.

That way someone can manually interject and handle those emails.

 
Sorry, I don't think that this is possible... but first of all let me check if I got everything right:

You want to send a mail from sender A to receiver B and if it is not possible to send the mail to receiver B the mail should not return to sender A but to a receiver C ?

What happens is that: You send the mail to... let's say billboygates@microsoft.com, the microsoft email-server will search for the email-adress of the receiver and if it doesn't find the receiver in its domain it will just send a mail with an error-message back to you (the sender).

What you can do is to either make your java-programm poll on your email-inbox for that error message or let the rules-wizzard of your email-client take care of the mail.



patrick.metz@epost.de
 
I wrote a script similiar to your needs in perl. It was initially built as a joke script where I could specify the to and from address. Of course the real sender info is hidden in the headers, and easily obtained, although there are still lots of people that don't know about that.

Say for e.g that my real email was: me@myvalid.com

When I said for eg. mailto sean@invalid.com
from kerry@valid.com

It was unsuccesful because to mailto address was incorrect, but it didn't send the mail back to me, it actually sent it to kerry@valid.com

This is were karma comes in to play and my joke bit me in my ass. Because unfortunately for me Kerry did know about header info and easily traced the practical joke email back to me.

Why not try changing the from address to a valid email address and the to address to an invalid email address and see if this will be the same case for you.

Hope this long winded almost useless info has some use to you.

Sean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top