Results 1 to 2 of 2

Thread: Send Email

  1. #1

    Thread Starter
    Addicted Member Jakys's Avatar
    Join Date
    Dec 1999
    Location
    Norway
    Posts
    180
    I got this little piece of code on a form with three textboxes, one command button, one MAPI Messages control and one MAPI sessions control. Everytime I start the program it checks for new mail, I don't want it to do that! And when I send the email it just puts it in the outbox (i know i have configured outlook express not to send email at once), is there a way to send the email anyway? And, does this code work on a machine without outlook?

    Private Sub Command1_Click()
    MAPIMessages1.SessionID = MAPISession1.SessionID
    MAPIMessages1.MsgIndex = -1
    MAPIMessages1.Compose
    MAPIMessages1.RecipAddress = txtRecipient.Text
    MAPIMessages1.MsgSubject = txtSubject.Text
    MAPIMessages1.MsgNoteText = txtMessage.Text
    MAPIMessages1.ResolveName
    MAPIMessages1.Send False
    End Sub

    Private Sub Form_Load()
    MAPISession1.SignOn
    MAPIMessages1.SessionID = MAPISession1.SessionID
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    MAPISession1.SignOff
    End Sub

  2. #2
    Junior Member
    Join Date
    Sep 2000
    Location
    Bogota - Colombia
    Posts
    23
    Use before signin

    MAPISession1.DownLoadMail = False

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width