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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
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: 129
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: 18987
    
    8

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: 129
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: 42913
    
  68
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.
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: 42913
    
  68
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: 42913
    
  68
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: 42913
    
  68
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: 12835
    
    5
Mail servers may swallow un-deliverable mail in order to thwart spammers and phishers.

Bill
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19783
    
  20

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 - OCEEJBD 6
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.
Apreet Singh
Greenhorn

Joined: Oct 10, 2012
Posts: 6
if other things not working, create log entry of email send attempt and have bcc to a designated id. Matching of data can be done to have delivery status. May not be advisable if high load system as this will double the number of emails being sent
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Apreet Singh wrote:if other things not working, create log entry of email send attempt and have bcc to a designated id. Matching of data can be done to have delivery status. May not be advisable if high load system as this will double the number of emails being sent

Not foolproof.
Check the discussion on the thread you started http://www.coderanch.com/t/597023/java/java/Email-delivery-confirmation


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get delivery status notification