Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get delivery status notification

 
swapnel surade
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is anyone know how to use

DeliveryStatus
MessageHeaders
MultipartReport

these classe to get the Delivery status for a mail.


thanks.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
even im facing the same problem..how to use deliverystatus class to receive status..
kindly help me out
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i need to get DSN (delivery status notification) for each mail I send.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this code.


 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mail servers may swallow un-deliverable mail in order to thwart spammers and phishers.

Bill
 
Rob Spoor
Sheriff
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Satheeshkumar Subramaniam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mail server will take care of sending notification for failed mails.
 
Apreet Singh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11196
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic