Solved

An ActiveX control to submit a form to a mail account- points will be incresed if answered.

Posted on 1998-11-30
1
149 Views
Last Modified: 2013-12-26
I want to have a activex control which can be used to submit a form directly to a mail server without the mail compose dialog box.This is a MS-Exchange mail server.I am a VB -5 programmer and will appreciate if u can tell me how to start making such an ActiveX control and also if it is available on the net ,plese do direct me there.if ur telling me to do I would appreciate if u tell me some books to read also for MAPI programming.

I will incease the point to at least 100 and grade it if i get an appropriate answer.
0
Comment
Question by:zeus_akkali
1 Comment
 
LVL 13

Accepted Solution

by:
Mirkwood earned 10 total points
ID: 1488578
ere is an example of using OLE Messaging to send a message:

Dim oSession As Object
 
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "MS Exchange Settings", True
Dim objMessage As Object ' Message object
Dim objOneRecip As Object ' Recipient object
 
If oSession Is Nothing Then
MsgBox "You have to log on first...."
Exit Sub
End If
 
Set objMessage = oSession.Outbox.Messages.Add
' create the recipient
Set objOneRecip = objMessage.Recipients.Add
objOneRecip.Name = "Rickcau@Microsoft.com"
objOneRecip.Type = mapiTo
objOneRecip.Resolve (True) 'Show dialog to resolve ambiguities
With objMessage ' message object
subject = "Test MAPI/OLE VB Message w/ole object - explicit"
Text = "Like you really wanted this ... please delete this test"
End With
' send the message
objMessage.Send showDialog:=False

For more information on direct MAPI calls and OLE Messaging, in the MSDN Library, see the book Win32 Messaging API (MAPI) in the Win32 SDK.

VB4: VBMAIL.ZIP MAPI sample to send/retrieve mail (VB4) at http://www.geocities.com/~scvb/allfiles.htm
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

856 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