?
Solved

MAPI

Posted on 2001-08-16
14
Medium Priority
?
621 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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 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…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

801 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