Using the code below, I am able to send ONE email successfully. The next time I run the app with the same username & password, I receive RTE 32002: Login has failed. I have Novel Groupwise 5.5 installed locally...
Private Sub Main()
' Error Handling
On Error GoTo ErrorHandler
' Body of Subroutine
With frmMAPI
Load frmMAPI
.Hide
With .MAPISession
.UserName = "YourName"
.Password = "YourPassword"
.SignOn
End With
With .MAPIMessages
.SessionID = frmMAPI.MAPISession.SessionID
.Compose
.RecipAddress = "YourAddress@YourProvider.com"
.RecipDisplayName = "YourName"
.MsgNoteText = "My Text"
.MsgSubject = "My Subject"
.Send False
End With
End With
SignOff:
frmMAPI.MAPISession.SignOff
Exit Sub
ErrorHandler:
GoTo SignOff
End Sub
Private Sub Main()
' Error Handling
On Error GoTo ErrorHandler
' Body of Subroutine
With frmMAPI
Load frmMAPI
.Hide
With .MAPISession
.UserName = "YourName"
.Password = "YourPassword"
.SignOn
End With
With .MAPIMessages
.SessionID = frmMAPI.MAPISession.SessionID
.Compose
.RecipAddress = "YourAddress@YourProvider.com"
.RecipDisplayName = "YourName"
.MsgNoteText = "My Text"
.MsgSubject = "My Subject"
.Send False
End With
End With
SignOff:
frmMAPI.MAPISession.SignOff
Exit Sub
ErrorHandler:
GoTo SignOff
End Sub