Solved

MAPI

Posted on 2001-08-16
14
619 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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