Regarding MAPI and Visual Basic

Posted on 1999-11-01
Medium Priority
Last Modified: 2013-11-25
I am using the MAPI controls on a VB form to successfully send email messages. Thanks for the many posts regarding this. My question is: I notice that when the email is sent, it pops up the familiar "connecting, sending message 1 of 1" message, and progress bar right over my form. At this point, is VB waiting? If I have other things going on in the background, will they be halted? I noticed that while this box is up I can't click on any area of the VB screen. Can I make it so this box does not pop up? Also, can I change the default timeout to less than 30 seconds. If our pop3 server isnt working, or the network is down, I don't want the thing to hang that long.
I'm basically trying to send an email at a certain point during a test, and I don't want it hanging there.
P.S. Other than that, it works great. I'm using VB6.0 with the MAPI controls and Outlook Express. I couldn't get Microsoft Internet mail to work. We only have internet mail, (no Exchange).
Question by:jscharpf

Expert Comment

ID: 2175355
Have you tried using VBAMAP32.DLL ?
LVL 12

Expert Comment

ID: 2175891
Yes. VB is waiting. As far as VB is concerned it is executing a single MAPI "Send" command. And it'll patiently wait until that command completes even if it takes all day.


Accepted Solution

mhein earned 200 total points
ID: 2175898
I have created a Simple Class Module in VB that uses outlook to create the Object, in this case an E-mail.  It spons it off to a ring around the kernel.  This allows your Application to continue running independent of the MAPI Process.  It is very simple, and it works pretty well (w/o Controls I might add)  If the POP Server or whatever Server Type you are using is unavavilable you will still get an error message, but your app will still continue to run unimpeded

Author Comment

ID: 2177390
This sounds great. Do you have sample code that I could use?


Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question