How to check if the mail has been sent successfully

前端 未结 8 1432
夕颜
夕颜 2020-12-24 07:00

I am developing an Asp.Net application, where I am sending a mail to the user\'s email address, if he forgets the password.

I want to check if the mail has been sent

8条回答
  •  太阳男子
    2020-12-24 07:11

    You can use the DeliveryNotificationOptions to receive a receipt.

    If you have a MailMessage object named mail, do this:

    mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;
    

提交回复
热议问题