I send the letter from the program on C #. Outlook mail. The letter arrives, but without notice, just in the incoming new letter appears. How to make the notification appear? Regular letters (not from the program) come with a notification.

SmtpClient Smtp = new SmtpClient(); Smtp.Host = "..."; Smtp.Port = 25; Smtp.UseDefaultCredentials = false; Smtp.DeliveryMethod = SmtpDeliveryMethod.Network; Smtp.EnableSsl = false; Smtp.Credentials = new NetworkCredential("name1@....ru", "pass"); MailMessage email = new MailMessage(); email.From = new MailAddress("name1@....ru"); email.To.Add(new MailAddress(sendemail)); email.Subject = "test"; email.Body = "test"; Smtp.Send(email); 
  • Your code will be ?? - Dmitry Chistik
  • @Dmitry Chistik, added code - Nataka
  • If you mean the notifications of the Outlook client on the desktop, then most likely the problem is in Outlook. Check the Outlook Options setting => Mail => Receive Message => Show Alerts on Desktop - Exodium
  • Also on this forum this problem was solved. - Exodium
  • @Exodium, notifications are included when regular letters arrive, a notification appears, it does not appear when sending from the program - Nataka

1 answer 1

Perhaps the property MailMessage.DeliveryNotificationOptions will help you.

From the description of MSDN: Gets or sets the delivery notifications for this email.