Is there a way to find out if an email was sent successfully using C #?
I am using System.Net.Mail.
set MailMessage DeliveryNotificationOptions to use inSystem.Net.Mail.DeliveryNotificationOptions.OnSuccess;
System.Net.Mail.DeliveryNotificationOptions.OnSuccess
or try:
static void ReadReceipts() { //create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress("me@mycompany.com"); mail.To.Add("you@yourcompany.com"); //set the content mail.Subject = "This is an email"; mail.Body = "this is the body content of the email."; //To request a read receipt, we need add a custom header named 'Disposition-Notification-To' //in this example, read receipts will go back to 'someaddress@mydomain.com' //it important to note that read receipts will only be sent by those mail clients that //a) support them //and //b)have them enabled. mail.Headers.Add("Disposition-Notification-To", "<someaddress@mydomain.com>"); //send the message SmtpClient smtp = new SmtpClient("127.0.0.1"); smtp.Send(mail); }
Only a way to find out if someone received an email, ask them to tell you in any way (read reciept or the like).
That's why all email confirmation schemes always have that you need to click the link to confirm that it is your email.
, Postmark, smtp api -.
Postmark uses PowerMTA , an email gateway capable of detecting unwanted markings, bounces, etc. You can go directly through PowerMTA, but Postmark wrap it all well.
Source: https://habr.com/ru/post/1765264/More articles:the value is not inserted into the text box, does it work two days ago? - javascriptWhat is the advantage of IDA than visual studio when disassembling dll? - disassemblytrying to get xui to work - javascriptForced IDA decompiler to use a different signature of functions of static functions in namespaces - c ++Custom Painting JPanel - javaКак определить путь exlorer.exe в .NET? - c#How to use API documentation - javaTraining event handling OpenCl - event-handlingJsTree with dnd plugin, always copy - drag-and-dropRails 3 с проблемой mysql - rubyAll Articles