0
我已經將郵件帳戶配置爲Microsoft Outlook,如果我從Outlook發送郵件完美並且副本存儲在已發送的郵件中,但是當我嘗試從我的vb.net windows應用程序發送的郵件都處於良好的方式發送,但郵件的副本不存儲在已發送的郵件,我怎麼能做到事先都要歸功於如何使用VB.Net在MS Outlook中保存已發郵件中的郵件
我的代碼如下
Dim mail As New MailMessage()
mail.From = New MailAddress("[email protected]")
mail.To.Add("[email protected]")
mail.Subject = "test"
mail.Body = "test"
Dim smtp As New System.Net.Mail.SmtpClient("smtp.rediffmailpro.com", 25)
smtp.EnableSsl = False
smtp.Credentials = New System.Net.NetworkCredential("[email protected]", "xyz123")
smtp.Send(mail)
MsgBox("email sent")
另見:http://stackoverflow.com/questions/227213/send-email-in-net-with-email-saved-in-users-sent-items – 2011-10-06 16:21:18