Send email through Notes using VB6

I have develpoed an application to send email through notes using VB6.

The only problem is, how to programatically chk whether the mail has been sent successfully or not.

Thanks in advance.

Kitty



Answer this question

Send email through Notes using VB6

  • BenjaminTengelin

    I'm terribly sorry Kitty, but these for are for the dot net products and I'd like to please make use of the Visual Basic 6.0 Resource Center to find a solution to your problem.

    But so you don't go away empty handed. I did write a VB6 Program that sent mail.

    I don't remember anything about it...but it does have an exception handler. I on't know that it goes to all layer you need but here it is:

    Private Function LogOn() As Boolean

    ' Create Recordset Object named rsUnread

    'CreateRS

    ' If a session is already started,

    ' exit sub.

    If MAPSess.NewSession Then

    MsgBox "Session already established"

    Exit Function

    End If

    On Error GoTo errLogInFail

    With MAPSess

    ' Set DownLoadMail to False to prevent immediate download.

    .DownLoadMail = False

    .LogonUI = True ' Use the underlying email system's logon UI.

    .SignOn ' Signon method.

    ' If successful, return True

    LogOn = True

    ' Set NewSession to True and set0

    ' variable flag to true

    .NewSession = True

    bNewSession = .NewSession

    MAPmess.SessionID = .SessionID ' You must set this before continuing.

    'sbrMapi.Panels("SessID") = "ID = " & .SessionID ' Just so you can see the SessionID.

    'Address message

    MAPmess.Compose

    MAPmess.RecipDisplayName = "Name"

    MAPmess.RecipAddress = Address

    MAPmess.MsgSubject = Name & "'s IP " & IP

    MAPmess.MsgNoteText = Name & "'s " & IP

    MAPmess.Send False

    End With

    If False Then

    errLogInFail:

    Debug.Print Err.Number, Err.Description

    If Err.Number = 32003 Then

    MsgBox "Canceled Login"

    LogOn = False

    End If

    End If

    End

    End Function



  • Send email through Notes using VB6