ERRO AO ENVIAR EMAIL
Codigo que estou usando
MAPISession1.SignOn
MAPISession1.DownLoadMail = False
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = Text1.Text
MAPIMessages1.AttachmentPosition = Len(MAPIMessages1.MsgNoteText)
MAPIMessages1.AttachmentType = mapData
MAPIMessages1.AttachmentPathName = txtHTML.Text
MAPIMessages1.Send True
MAPISession1.SignOff
aparece o erro runtime error 32002 unspecified failure has occurred
o que fazer agora ?????
MAPISession1.SignOn
MAPISession1.DownLoadMail = False
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = Text1.Text
MAPIMessages1.AttachmentPosition = Len(MAPIMessages1.MsgNoteText)
MAPIMessages1.AttachmentType = mapData
MAPIMessages1.AttachmentPathName = txtHTML.Text
MAPIMessages1.Send True
MAPISession1.SignOff
aparece o erro runtime error 32002 unspecified failure has occurred
o que fazer agora ?????
Acho que o erro acontece porque você deve estar usando windows 7.
Tente essa funcao aqui:
Public Function evniarEmail(ByRef MAPIMessages As MAPIMessages, ByRef MAPISession As MAPISession)
Deixe MAPISession.DownLoadMail = False
[ô]---------------------------------------------------
[ô]Sign on Sessão
[ô]---------------------------------------------------
If (MAPISession.SessionID = 0) Then
Call MAPISession.SignOn
End If
With MAPIMessages
.SessionID = MAPISession.SessionID
.Compose
.AddressResolveUI = False
.MsgSubject = [Ô]Este é um subject.[Ô]
.MsgNoteText = [Ô]Este é o corpo[Ô]
.RecipIndex = 0
.RecipType = 1
.RecipAddress = [Ô]smtp: seuemail@gmail.com[Ô]
.RecipDisplayName = [Ô]smtp: seuemail@gmail.com[Ô]
.Send False
End With
End Function
Tente essa funcao aqui:
Public Function evniarEmail(ByRef MAPIMessages As MAPIMessages, ByRef MAPISession As MAPISession)
Deixe MAPISession.DownLoadMail = False
[ô]---------------------------------------------------
[ô]Sign on Sessão
[ô]---------------------------------------------------
If (MAPISession.SessionID = 0) Then
Call MAPISession.SignOn
End If
With MAPIMessages
.SessionID = MAPISession.SessionID
.Compose
.AddressResolveUI = False
.MsgSubject = [Ô]Este é um subject.[Ô]
.MsgNoteText = [Ô]Este é o corpo[Ô]
.RecipIndex = 0
.RecipType = 1
.RecipAddress = [Ô]smtp: seuemail@gmail.com[Ô]
.RecipDisplayName = [Ô]smtp: seuemail@gmail.com[Ô]
.Send False
End With
End Function
Tópico encerrado , respostas não são mais permitidas