Send a HTML mail using VB Mail MAPI component

I have picked up the VB Mail MAPI component. I wish to send the a mail. This component does this. My requirement is i wish to send a HTML Mail. (Created from within the VB code).
Need some help in this regards.

Also be able to view Public folders using this VB MAPI.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Read this,
It alos has links to sample code...

HOWTO: Send an HTML Message Using MAPI and CDO

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
qualityacubeAuthor Commented:
I am unable to download the code for the MAPI RTF .dll.

Anyway.. it does not talk of Sending HTML Mails but it talks only of Displaying them RTF Format.

My requirement is i want to view all those mails the same way the code displays but i wish to send them in HTML

The frmmain.mapimess.send will send the mail only in text format. I want to send the mail by adding my gifs,like...

I pick up a mail and concatenate with Question and Display a dialog for the user to add an answer and on clicking send concatenate the Header Image + Question + Mail + Answer + dialog text + Footer Image.

All this is to go in a HTML Format.

Please help ... i need to get this done by tomorrow.

Thanks in advance.
I bought this question and answer and the link doesn't work but I really need the answer.
Please help
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

here you go, sample from MSDN, the site is,

The key is to set the BodyFormat property to CdoBodyFormatHTML  (0) to send HTML format. Also, you can embed the images using AttachURL method so that all your images (and any other stuff that you may want to embed can be sent)

Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"""
HTML = HTML & "content=""text/html; charset=iso-8859-1"">"
HTML = HTML & "<meta name=""GENERATOR"" content=""Microsoft FrontPage 2.0"">"
HTML = HTML & "<title>Exchange CDO Example</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""#FFFFFF"">"
HTML = HTML & "<p><font size=""6"" face=""Arial Black""><strong>Exchange CDO " 
HTML = HTML & "Sample<img src=CDO.gif>"
HTML = HTML & "</strong></font></p>"
HTML = HTML & "<p>CDO for NTS allows an easy way to send mail."
HTML = HTML & "This example shows how the content can be an HTML page"
HTML = HTML & "which allows you to send rich text and inline graphics.</p>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
myMail.AttachURL "D:\wwwroot\CDO.gif", "CDO.gif"
myMail.From = ""
myMail.To = ""
myMail.Subject = "Sample Message"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML

hope this helps...

Is there a similar solution using MAPI Controls where CDONTS is not available?
You can use MAPI and not CDONTS for sending mails only if the machine on which the application is running has MS Outlook as Mail Client whose mail server is MS Exchange Server

CDONTS is just like any SMTP mail wrapper (ofcourse with fancy HTML emailing). As long as you know the mail server addrress and have NT server you can use CDONTS... (you can write your own SMTP mail client otherwise which will work on any OS as long as you know the SMTP mail server address and valid with valid From e-mail address)

Here is the code for MAPI,

hope this helps you...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.