ASP.NET發郵件

這是關於需要驗證的服務器加上用戶名和密碼,呵呵。
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication ,mail是一個mailmessage型的變量
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", this.UserName); //set your username here

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", this.Password); //set your password here
ADO關閉連接池:
  OLE:連接字符串後加 OLE DB Services=-4
  SQL:        Pooling=False
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章