Sending mail using SmtpClient in .net

前端 未结 5 1439
一整个雨季
一整个雨季 2021-02-07 02:19

I am unable to send the mail using smtp client. here is the code:

SmtpClient client=new SmtpClient(\"Host\");
client.Credentials=new NetworkCredential(\"username         


        
5条回答
  •  无人及你
    2021-02-07 02:38

    It means your mail server does not allow Mail-Relay. Your mail server only allows you to send mail from authenticated email-id as username. Generally this is done to prevent mails being sent as different identities other than the authenticated one.

提交回复
热议问题