How do I send emails outside my domain with Exchange 2007 and c#

前端 未结 4 2109
情歌与酒
情歌与酒 2021-02-10 05:43

I am able to send emails using the typical C# SMTP code across Exchange 2007 as long as both the from and to addresses are within my domain.

As soon as I try to send ema

4条回答
  •  春和景丽
    2021-02-10 06:15

    Authenticate to the exchange server.

    http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.credentials.aspx


    DefaultNetworkCredentials returns empty strings for username etc and causes this exception...

    Here is an example, and here is another of sending authenticated message with System.Net.Mail.

提交回复
热议问题