473,666 Members | 2,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

send automatic email - MAPI?

Hi,

I have a VB.NET windows app that needs to automatically send a simple text
email when my users run a new version of the app for the first time. I
thought this would be simple, but after days of reading posts and testing, I
see it is not - unless I'm missing something? I'm not an email guru.

All of my users will be running at least Windows 2000, most on XP sp2. Some
of my users will have Outlook, many will be using Outlook Express, some will
have who knows what. Most of my users will not be connected to the internet,
they are in tribal locations in the jungle. Most will connect a couple of
times per day via radio to send and receive email.

I thought with MAPI, I could easily send a message from my code, and it
would not matter what mail client the user had, or whether the user was
connected to the internet: my message would be placed in the outbox of
whatever mail client was the default, and whenever the user sent/received
mail, my message would be sent.

I have run into several problems:
1. the vb6 MAPI code I ported to VB.NET gives me the irritating 5-second
wait box, and when I click Yes, I get the error "Unspecifie d Failure has
occurred at MSMAPI.IMapMess ages.Send(Objec t vDialog)".

2. I tried SMTP, but my SMTP send gives me "Could not access 'CDO.Message'
object", saying the transport failed to connect to the server. And if I
understand correctly, with SMTP, the user would actually have to have a live
internet connection at the moment my code attempts to send an email, is that
true?

3. Using Outlook objects, it actually works, whether the user is connected
to the internet or not, and whether Outlook is currently running or not - if
the user has Outlook installed. However, there is still the irritating
5-second message box "a program is trying to send mail" the user has to know
to click Yes on.

4. I tried Outlook Redemption, and it works great if Outlook is running and
is connected to the internet - the irritating messagebox is suppressed, and
the email is sent. However, I get errors if Outlook is not actually running,
or else the message I send ends up stuck in the user's Inbox instead of
Outbox.

I'm not sure what is the best solution here. Ideally, I'd like to send an
email (with no warning messagebox popping up) that will go out on the user's
default email client the next time the user sends/receives mail from that
client.

Failing that, if I can code several different ways of trying to send the
email, and try each one in sequence until one of them succeeds, that would be
great too. But I'm at a loss to know what methods are best to try, or the
best way to research those methods.

Does anyone have any recommendations ?

Thanks!
David
Jul 21 '05 #1
0 3695

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
11850
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client
1
5336
by: Jay McGrath | last post by:
Help - trying to send a simple text email with with as little user intervention. I am trying to create a button in my Access application that will automatically send a simple text email. It works except that I have two warning nuisances: 1) Program is trying to access email Addresses you have stored in Outlook. Allow access for ... 2) A program is trying to automatically send email on your behalf ... Heck, I am only trying to a send...
0
552
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after days of reading posts and testing, I see it is not - unless I'm missing something? I'm not an email guru. All of my users will be running at least Windows 2000, most on XP sp2. Some of my users will have Outlook, many will be using Outlook...
2
3129
by: madfisher | last post by:
Hi, I am trying to send an email with MAP via C# and ASP.NET. This is what I'm doing. MapiSession1 = new MSMAPI.MAPISessionClass(); MapiSession1.UserName = "OutlookProfileName"; MapiSession1.Password = "pass"; MapiSession1.LogonUI = false; MapiSession1.SignOn();
15
8584
by: cj | last post by:
How can I get a button in VB to send the contents of a text box via email in a manner similar to the "Send To\Mail Recipient" functionality that you can select via right clicking a file in Windows Explorer? I want the user to click a button and it lunch the users default email client and put the contents of a multi line text box in the body of the message and the contents of another text box in the title box and be sitting there read for...
3
2837
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and additionally pictures of the product are stored in an images subfolder and the database holds the file name of the relevant picture. The user can then click a button to display the picture in a pop-up window and also another button to email the potential...
3
4689
by: sentiboy | last post by:
I am using the following code for sending email through mapi in VS 2005 environment: Public objSession As New MSMAPI.MAPISession Public objMessage As New MSMAPI.MAPIMessages objSession.DownLoadMail = False objSession.UserName = "MyUsername" objSession.Password = "MyPassword" objSession.SignOn()
1
4388
by: Danny | last post by:
Hi Am trying to send emails via simple mapi. The application will be running on a machine which has outlook 2003 installed. My test app works but the file email is placed in the outbox within outlook, and does not get sent until a start outlook and process the waiting emails. Is there any way I can send the emails without the interaction of outlook? Am connecting to exchange 2003 btw, using dotnet 2.0
1
5034
by: prasadmore | last post by:
I am developing a web service using CDO 1.21 to create an appointement in Exchange Server 2003. The Logon method is executing successfully and able to access Inbox folder. When I try to create an appointement using following code snippet, I get "{" ]"}" error. Not able to understand whether we are missing any property or are we setting the properties to correct values. If anybody has encounter this problem before and know how to fix this. please...
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6189
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.