Results 1 to 11 of 11
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send Mail thru VB6 (VB6/Outlook xp)

    I have a button on a form where I try to create a message. But its not working, what am I doing wrong.

    Private Sub mail_click()
    MAPISession1.Download = False
    MAPISession1.SignOn

    MAPIMessages1.SessionID = MAPISession1.SessionID
    MAPIMessages1.MsgIndex = -1
    MAPIMessages1.Compose
    MAPIMessages1.Send True

    MAPISession1.SignOff

    End Sub

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    Did you do a search on "send mail" in this forum? Try that to see if another approach might not work for you. There a quite a few posts out there.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    Sorry, I meant to give you this link too.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    Will I thought I had done all the necessary research. BUT, I borrowed a book from someone and it is talking about going to PROJECT/Components and make sure to select MAPI Controls 6.0. Problem is that, that option is not listed in there.

    Now I need to find out how to load MS MAPI Controls 6.0 onto my copy of VB6.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    The listing is Microsoft MAPI Controls 6.0, and it turns up in my copy of VB6 Professional. What version of VB6 are you running? And what version of *Windows* are you running?
    Charlotte

  6. #6
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    I am running VB6 Enterprise and Windows 2K and Office XP

    I believe it was an option in the installation and our Network Group didn't load all the options. Guess I have to borrow the disk and see if I can load this and maybe other options that were not installed.

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    Ah, yes, the IT guys strike again! Someone decides that the people actually *using* a tool or an application don't really need all those bells and whistles, and so the few who actually do need them as left banging their heads. <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

    While I can understand their need to do standardized installations, they still need to be <img src=/S/bash.gif border=0 alt=bash width=35 height=39>ed for not having multiple levels of standardization.
    Charlotte

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    There's another nifty way to send mail from VB/VBA etc. apps if you have a web server at hand. It utilizes the SMTP engine and the CDONTS library from an ASP script. I switched to this technique because Office XP displays a warning message with a very irritating progress bar whenever my code tries to send mail using the various client MAPI libraries. I not only don't want the user to see that warning, I don't want them to see anything (not even an entry in their Sent folder). Works great.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    Kevin,

    Extended MAPI also gets around those annoying messages because it doesn't run afoul of all the security holes in Outlook and IE, and it doesn't require a web server. For a few bucks, you can get the Redemption.dll, which gives you a handy wrapper for all the ugly API calls to Extended MAPI.
    Charlotte

  10. #10
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    Nice tip. Thanks. I've heard of redemption, but never investigated. Maybe now I will.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send Mail thru VB6 (VB6/Outlook xp)

    We use it and have found that it works nicely with Windows 95 - XP. I have all available security patches on my OXP/Win2k machine and it works like a charm there.
    Charlotte

Posting Permissions

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