ERRO UNSPECIFIED FAILURE HAS OCCURRED 32002
Não consigo enviar email.
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = txtdestino.Text
MAPIMessages1.AddressResolveUI = False
MAPIMessages1.MsgNoteText = txtassunto.Text
MAPIMessages1.Send False
MAPISession1.SignOff
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = txtdestino.Text
MAPIMessages1.AddressResolveUI = False
MAPIMessages1.MsgNoteText = txtassunto.Text
MAPIMessages1.Send False
MAPISession1.SignOff
Tente usando a rotina abaixo:
Public Function Enviar(ByRef mensagens As MAPIMessages, _
ByRef sessao As MAPISession, _
ByVal Assunto As String, _
ByVal Mensagem As String, _
ByVal Recipiente As String) As Boolean
On Error GoTo hell:
Dim ret As Boolean
Let sessao.DownLoadMail = False
If (sessao.SessionID = 0) Then Call sessao.SignOn
With mensagens
.SessionID = sessao.SessionID
.Compose
.AddressResolveUI = False
.MsgSubject = Assunto
.MsgNoteText = Mensagem
.RecipIndex = 0
.RecipType = 1
.RecipAddress = Recipiente
.RecipDisplayName = Recipiente
.Send False
End With
Call sessao.SignOff
ret = True
GoTo sai:
hell:
MsgBox Err.Description
Err.Clear
ret = False
sai:
Enviar = ret
End Function
Valew!!
Tópico encerrado , respostas não são mais permitidas