How to send an email from my C# codebehind - Getting System.Net.Mail.SmtpFailedRecipientException

前端 未结 3 423
[愿得一人]
[愿得一人] 2021-01-22 02:23

I have a webform where someone can set up an account - I want to send them an email confirmation.

The code I\'m using:

       // Create e-mail message
           


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-22 02:48

    I'm guessing this is because your website is not running under a domain account. A lot of mail servers don't allow anonymous users send email.

    You could try creating a service account that's in the domain and set the application pool up to run under that service account.

提交回复
热议问题