Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending an email through VB

Status
Not open for further replies.

DaveMere

Programmer
Nov 24, 2003
20
GB
Hello all.

I'm trying to send an email automatically when a certain procedure in my application runs successfully. I'm using MAPI controls to do this, but even though I've added the MAPI component to my project when I try to run the line;

MAPISession1.SignOn

I get the error;

Run time error '30000'
Error in loading MAPI DLL

What am I missing? Is my application incorrectly installed?

 
What is your default e-mail program & which version of Windows? The MAPI subsystem, (usually installed by the e-mail client) must already exist for the MAPI controls to work.

Paul Bent
Northwind IT Systems
 
I use Pegasus Mail 3.1 on Windows NT.

How might I find out if the MAPI subsystem is installed (and what is it?)
 
You probably need to rename MAPI.dll and reinstall Internet Explorer/Outlook Express. This KB article, although for a different product, looks relevant:


A lot of e-mail programs overwrite MAPI.dll. Some permanently but others like NetScape swap it when opened/closed.

If running under W9x/ME you can also install the Windows Messaging Subsystem to get MAPI support. Its in Control Panel on 95 but in 98 it's on the OEM CD (wms.exe) in one of these locations:

\tools\oldwin95\message\us
\tools\oldwin95\message\intl


Paul Bent
Northwind IT Systems
 
I can't find the mapi.dll anywhere. I'm a little confused about all this to be honest. We don't use Outlook Express, and the techs seem to think that direct mail from VB using mapi isn't going to work.

What about sending the mail via a direct UNIX command? Can you send a line of unix code direct to the server?

 
I would look at the CDONTS/CDO for Windows 2000/CDO for Exchange libraries; one should be available depending on your development platform.

They provide a COM interface for SMTP mail and don't need MAPI. Here's a couple of kb articles which may help you understand the different flavours of MAPI and CDO:





Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top