Solved

MAPI

Posted on 2001-08-16
14
620 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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

687 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