Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hii,

when i send mail ,i want to get delivery report on successful mail send...my coad is,


mailObj.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;

mailObj.Headers.Add("Disposition-Notification-To;kavitapainter@gmail.com)


i use this code..bt it does not work i cant get any type of deliver report after send mail...


pls giv me solution..
Posted
Updated 18-Feb-14 17:45pm
v2
Comments
The14thNoah 18-Feb-14 3:28am    
thus it give back error?
kavita painter 18-Feb-14 3:36am    
no...
The14thNoah 18-Feb-14 3:49am    
Do you debugg it?and pass all the line of codes?
Please consider my suggested answer below :)

public void mail()
   {
       System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
       System.Net.Mail.SmtpClient smtpClient = new SmtpClient();
         
        //set the addresses
       mail.From = new MailAddress("xyz@gmail.com");
       mail.To.Add(TextBox1.Text);
       mail.ReplyTo = new MailAddress("xyz@gmail.com");
       //set the content
       mail.Subject = "This is an email";
       mail.Body = "body content of the email.";
 
            
       mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;
       mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
       mail.DeliveryNotificationOptions = DeliveryNotificationOptions.Delay;
       mail.DeliveryNotificationOptions = DeliveryNotificationOptions.Never;
       mail.DeliveryNotificationOptions = DeliveryNotificationOptions.None;
         
       mail.Headers.Add("Disposition-Notification-To", "xyz@gmail.com");
 
      smtpClient.Host = "relay-hosting.secureserver.net";
       mail.Priority = System.Net.Mail.MailPriority.High;
       smtpClient.Send(mail);

   }



or you can refer

http://www.emailarchitect.net/eagetmail/sdk/html/object_overview.htm[^]

Regards,
Praveen Nelge
 
Share this answer
 
please read this article I hope it will help you understand more about eMail sending
Happy coding :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900