• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to get delivery status notification

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i need to get DSN (delivery status notification) for each mail I send.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ..
 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this code.


 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mail servers may swallow un-deliverable mail in order to thwart spammers and phishers.

Bill
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mail server will take care of sending notification for failed mails.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 https://coderanch.com/t/597023/java/java/Email-delivery-confirmation
reply
    Bookmark Topic Watch Topic
  • New Topic