aspose file tools
The moose likes Other JSE/JEE APIs and the fly likes how to get delivery status notification Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "how to get delivery status notification" Watch "how to get delivery status notification" New topic
Author

how to get delivery status notification

swapnel surade
Ranch Hand

Joined: Mar 05, 2009
Posts: 124
hi all,

when I send mails, I want to check the status of the each mail.

can I get DSN (delivery status notification) for each mail I send.....
In javamail api com.sun.mail.dsn package provides 3 classes as
DeliveryStatus
MessageHeaders
MultipartReport

how to use these classes (I'm unable to get any info about these classes in tutorials)


thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 13842

You can ask for one. But you can't expect to get any, as it's optional for mail agents to send DSNs. Many mail agents allow the user to specify whether they want to send DSNs, either on a per-message basis or as a configuration option which applies to all messages.
swapnel surade
Ranch Hand

Joined: Mar 05, 2009
Posts: 124
is anyone know how to use

DeliveryStatus
MessageHeaders
MultipartReport

these classe to get the Delivery status for a mail.


thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
Start with this: http://forums.sun.com/thread.jspa?threadID=5337555

The javadocs of the com.sun.mail classes can be found in the JavaMail download. Be sure to read the section on "DSN Support" in the NOTES.txt file that comes with the download.

Also see this JavaMail FAQ entry.


Android appsImageJ pluginsJava web charts
Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21
hi all,
even im facing the same problem..how to use deliverystatus class to receive status..
kindly help me out
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
Satheeshkumar Subramaniam wrote:even im facing the same problem..how to use deliverystatus class to receive status..

After reading the three documents I linked to, what questions do you have specifically?
Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21
Hi Ulf Dittmer ,
thanks for help.. my question is how to use deliverystatus class of dsn API while sending mail using javamail API?
my requirement is receiving delivery failure notification for the recipients..

kindly help me out
Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21

i need to get DSN (delivery status notification) for each mail I send.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
I understand, and the material linked above describes how to go about that using JavaMail. Was there anything in particular you didn't understand about that? What have you tried so far?

Of course, as the JavaMail FAQ points out, not all servers support DSNs, in which case you have to go about the problem in the ways mentioned in the other thread where you asked about this.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
I see that you now posted to www.java-forums.org as well, once again without noting the multiple cross-postings; I've just lost interest in helping you any further. Good luck.
Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21
Hi Ulf Dittmer,
actually i need the same requirement and its urgent too . thats y i posted the same otherwise if i did anything wrong pardon..im new to thse forums.
kindly help me out ..
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Try this code.


William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 11862
Mail servers may swallow un-deliverable mail in order to thwart spammers and phishers.

Bill


Java Resources at www.wbrogden.com
Rob Spoor
Saloon Keeper

Joined: Oct 27, 2005
Posts: 18365

Satheeshkumar Subramaniam wrote:Hi Ulf Dittmer,
actually i need the same requirement and its urgent too . thats y i posted the same otherwise if i did anything wrong pardon..im new to thse forums.
kindly help me out ..

http://faq.javaranch.com/java/EaseUp
http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21
Hi naresh,
thanks dude..

# pp.setProperty("mail.smtp.dsn.notify","FAILURE ORCPT=rfc822;");
# pp.setProperty("mail.smtp.dsn.ret", "FULL");

im simply added this. but
how this code wil work? how do it get delivery notice?
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Mail server will take care of sending notification for failed mails.
 
 
subject: how to get delivery status notification
 
Threads others viewed
How do I know the email is Sending failed?
help please.
How to identify received mail is failure delivery notice mail in javamail?
Mail API
how to get status mail using javamail.
developer file tools