我完全糊塗了有關配置asp.net網站發送電子郵件 - 希望你能幫助我在這裏請IIS7 - 發送電子郵件
它是在2008年贏得運行R2與IIS 7.5 我有VS 2010的ASP。試圖發送郵件的網絡應用程序。
[1]我得到了STMP服務器insatlled在這臺服務器 - 但無法找到「發送電子郵件」在功能視圖..這是一個問題?
[2]這是我的代碼
using System.Net.Mail;
:
:
//(1) Create the MailMessage instance
MailMessage mm = new MailMessage("[email protected]", "[email protected]");
//(2) Assign the MailMessage's properties
mm.Subject = "Subject";
mm.Body = "the content of body here";
mm.IsBodyHtml = true;
//(3) Create the SmtpClient object
SmtpClient smtp = new SmtpClient();
//(4) Send the MailMessage (this will use the Web.config settings)
smtp.Send(mm);
web.config文件中有
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
host="MailServer2"
port="25"
userName="user_id"
password="password"
/>
</smtp>
</mailSettings>
</system.net>
在我公司
我們有一個郵件服務器(MS Exchnage服務器)託管的不同的充服務器上(比如說MailServer2 )
所以
如果我使用 「主機=」 作爲MailServer2(這是郵件服務器) - 它山YS,「無連接可以作出,因爲目標機器積極地拒絕」
如果我使用「主機=」作爲本地主機IP - 誤差爲「郵箱無法使用。服務器響應爲:5.7.1無法中繼爲「
即使我試圖用配置啓動SMTP - >聯繫toold - > IIS 6.0經理的選擇,但沒有喜悅
是我。 「M做任何愚蠢的IIS7是很新的給我 - ?任何幫助是非常appricated
任何幫助,請
乾杯 VENU
我嘗試了用特定的方法來找到什麼版本的Exchange服務器? – 2012-02-08 21:31:48
這裏[鏈接] http://office.microsoft.com/en-us/outlook-help/determine-the-version-of-microsoft-exchange-server-my-account-connects-to-HA010117038.aspx [/ link ]並顯示爲32981.但說到我的管理員傢伙,他說這是2007年。 這是配置依賴於Exchange版本? – 2012-02-09 10:24:40