Solved

MAPI

Posted on 2001-08-16
14
617 Views
Last Modified: 2008-02-01
Is it possible to use MAPI to send HTML e-mail?  If so, please provide an example.
0
Comment
Question by:_Canidae_
  • 7
  • 3
  • 2
  • +1
14 Comments
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6392500

hearing
0
 
LVL 1

Author Comment

by:_Canidae_
ID: 6392534
Uh huh.
0
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6392696
Here is an example to send 'normal' text via MAPI:

Put the code in Module...  
'make sure that on the default e-mail use of MAPI server is allowed

Option Explicit
'2 controls Microsoft MAPI Control 6.0 -> MAPISession and MAPIMessages

Private Sub Command1_Click()
 Dim msg As String
 
 Screen.MousePointer = vbHourglass
 
 msg = "This is a test email"
 
 With Me

   .MAPILogOn.SignOn ' use current user
 
   Do While .MAPILogOn.SessionID = 0
     DoEvents ' need to wait until the new session is created
   Loop
   
  Call SendToEmail("iboutchkine@hotmail.com", msg)
   
   .MAPILogOn.SignOff
 End With
 
 Screen.MousePointer = vbNormal
 
End Sub

Private Sub SendToEmail(ByVal Email As String, ByVal msg As String)
 With MAPIMessages1
   'create a new message and address it
   .SessionID = MAPILogOn.SessionID
   .Compose
   .RecipDisplayName = Email
   .AddressResolveUI = True
   .RecipAddress = "smtp:" & Email
   
   .MsgSubject = "VB GENERATED E-MAIL"
   .MsgNoteText = msg
  'if True then open Netscape and wait, if false then sends to Eudora.
   .Send False
 End With
End Sub

Hope this helps a litte
WoK

0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 1

Author Comment

by:_Canidae_
ID: 6392735
Thanks but I already know how to send plain text using MAPI.  I need to know if it's possible to send HTML with MAPI, and if so, how.
0
 
LVL 1

Accepted Solution

by:
cbitservices earned 50 total points
ID: 6393316
Hi Canidae,

It isn't possible using MAPI, but can be done using Extended Mapi. Let me have your e-mail address (send an e-mail to me at: email removed - Bingie EE PE) and I will send you a sample project with all the info.

Regards,

Colin.
0
 
LVL 1

Author Comment

by:_Canidae_
ID: 6393348
Thanks, I'm mailing now.
0
 
LVL 1

Author Comment

by:_Canidae_
ID: 6427761
I haven't had a chance to try out what you sent me, but I'm sure it will work when I eventually do!
0
 
LVL 1

Expert Comment

by:cbitservices
ID: 6427975
Hi Canidae,

It worked for me, but if you have any problems let me know (by e-mail) and I will help further if I can.

Regards,

Colin.
0
 
LVL 1

Expert Comment

by:jkanisut
ID: 14729032
Hello,

Can I get a copy of the Extended-MAPI code?

Joe
0
 
LVL 1

Author Comment

by:_Canidae_
ID: 14731320
With it being four years later and all, I might have some trouble finding it...
0
 
LVL 1

Expert Comment

by:jkanisut
ID: 14733935
Yea... I'm working four years behind the times... if you can find it, I'd appreciate it.
0
 
LVL 1

Author Comment

by:_Canidae_
ID: 14734077
Just had a search through my e-mails and can't find it.  Must be plenty of examples online though!
0
 
LVL 1

Expert Comment

by:jkanisut
ID: 14734142
Thanks... not much luck searching.  I did run accross Outlook Redemption... going to try that.
0
 
LVL 1

Author Comment

by:_Canidae_
ID: 14734261
If I recall correctly, I never got it working anyway.  I think I eventually resorted to using JMail to accomplish HTML e-mail-sending.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
passing parameter in sql procedure 9 61
Macro Excel - Multiple If conditions 2 72
Sub or Function is not defined 6 26
VBA - If Bookmark = "XXBOOKMARKXX" then 15 25
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…

786 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