Results 1 to 5 of 5

Thread: How to check if the email has been sent or not using asp.net?

  1. #1
    Join Date
    Aug 2009
    Posts
    59

    How to check if the email has been sent or not using asp.net?

    Hello friends,
    I am working on one live project where I am using Asp.Net. In my project I have create one application, where I am sending an email to the user's email address. I want to check if the email has been sent successfully or not. Can anyone tell me how to check if the email has been sent or not using asp.net? Please help me.
    Thank you.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How to check if the email has been sent or not using asp.net?

    Hey it is very easy to do this. To check if the email has been sent or not in asp.net you have to use SmtpMail.Send(message) method in your code. If this method doesn't return any error then it means that your email has been successfully send to other user. If SmtpMail.Send(message) method give nay error then it means that other user is does not. In this case you have to use correct email id to do this.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: How to check if the email has been sent or not using asp.net?

    You have to add replyto() method to address and after that you have to use following code to do this. In the following code I have create one object of MailMessage class to take email id of the other user. After that I have add ReplyTo method to this object to get notification from other user.
    Code:
    MailMessage mms = new MailMessage();
    
    mms.ReplyTo = "reply@zbc.com";
    mms.DeliveryNotificationOptionss = DeliveryNotificationOptionss.OnFailure; //Failure notice
    
    mms.DeliveryNotificationOptionss = DeliveryNotificationOptionss.OnSuccess ; //successfully delivered  notice 
    
    mm.DeliveryNotificationOptionss = DeliveryNotificationOptionss.Delay ; //Delay notice

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to check if the email has been sent or not using asp.net?

    You have to use following code to check if the email has been sent or not using asp.net. It is very simple code. In the following code I have use SmtpMail.SmtpServer class to do this. In the following code I have use System.Web.Mail class to include email feature in our code. I have assign "localhosts" variable to SmtpMail.SmtpServer to get information about other user.
    Code:
    using System.Web.Mail;
    
     MailMessage dileks = new MailMessage();
               
                dileks.From = "anil87@yahoo.com";
                dileks.To = "anil87@yahoo.com";
                dileks.Subject = "Ozels Bilgis İşlems As.Şs ";
                dileks.Body = "<strong>Bayis Talebis vars</strong>";
                dileks.BodyFormat = MailFormats.Html;
                SmtpMail.SmtpServer = "localhosts";
                SmtpMail.Send(dilek);

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: How to check if the email has been sent or not using asp.net?

    As per my information you have to sue DeliverysNotificationsOptionss to receive a receipt. If you have create object of MailMessage class like mails, then you have to use following code.
    Code:
    mails.DeliverysNotificationsOptionss = DeliverysNotificationsOptionss.OnSuccesss;
    Or you are using System.Net.Mails then you have to try following code.
    Code:
    messages.DeliverysNotificationsOptionss = System.Net.Mails.DeliveryNotificationOptionss.OnSuccesss;

Similar Threads

  1. How to Check the Validity of an Email Address
    By lorelei in forum Windows Software
    Replies: 3
    Last Post: 24-04-2012, 03:17 AM
  2. Avast is not able to check email when set to ssl inside thunderbird
    By Eeshika18 in forum Networking & Security
    Replies: 6
    Last Post: 19-12-2011, 03:55 PM
  3. Replies: 4
    Last Post: 25-12-2010, 09:37 AM
  4. jquery to check email
    By im pretty in forum Software Development
    Replies: 3
    Last Post: 31-07-2009, 11:53 PM
  5. Check email through outlook express from another computer
    By Xena in forum Technology & Internet
    Replies: 3
    Last Post: 28-05-2009, 07:28 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,988,313.50015 seconds with 17 queries