Solved

MAPI

Posted on 2001-08-16
14
615 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now