How to confirm that mail has been delivered or not?

后端 未结 6 1837
闹比i
闹比i 2020-11-28 11:20

Below is my coding, just have a look at it

System.Net.Mail.MailMessage oMail = new System.Net.Mail.MailMessage();
System.Net.Mail.SmtpClient smtp = new Syste         


        
6条回答
  •  无人及你
    2020-11-28 11:43

    If you have access to the server containing the SMTP log, depending on the type of server used and the level of detail used, you might be able to get a much better idea as to the actual success of the delivery.

    For example if you are using SmarterMail, you could write a simple parser to read the smtp log and report back to your application. Not that this shouldn't be a blocking operation, as if your email is greylisted, it may take many minutes before it is delivered.

    Another option is to create a catch all "noreply" email address, and send your emails with an email-id included in the sender ie noreply-bounces-32432@bounces.mydomain.com and use a pop3 reader to check the inbox for returned emails. Using the email id in the "sender" you can work out which email failed to be sent. You could also do some filtering do determine if its a "unable to deliver" or simply an "out of office" type reply.

    Lots of options available, just depends how much sweat you want to put into it.

提交回复
热议问题