开发者

im need know how i used pop3 with smtp sender VB.NET 2008

开发者 https://www.devze.com 2023-01-28 00:36 出处:网络
im need know how i used pop3 with smtp sender VB.NET 2008 I HAVE THE problem with that when i put the smtp yahoo 开发者_开发技巧and the account user and password he tell me Failure sending mail.

im need know how i used pop3 with smtp sender VB.NET 2008

I HAVE THE problem with that when i put the smtp yahoo 开发者_开发技巧and the account user and password he tell me Failure sending mail.

so plz im need the help now thanks


Here is one way to send smtp mail from VB.Net. AxMSMAPI.AxMAPI.Session and AxMSMAPI.AxMAPI.Messages are vb6 compatibility controls, I believe. This requires a MAPI email client on the user's system, such as Outlook.

Try
  MAPISession1.SignOn()
  MAPIMessages1.SessionID = MAPISession1.SessionID
  MAPIMessages1.Compose()
  MAPIMessages1.MsgNoteText = "Message Text"
  MAPIMessages1.AttachmentPathName = currentPicPath
  MAPIMessages1.AttachmentName = Path.GetFileName(currentpicpath)
  MAPIMessages1.AttachmentType = 0
  MAPIMessages1.Send(True)
  MAPISession1.SignOff()
Catch ex As Exception
  MsgBox("Warning: The email was not sent. " & ex.Message, MsgBoxStyle.OkOnly)
End Try
0

精彩评论

暂无评论...
验证码 换一张
取 消