Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gmmastros on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MAPI - Send HTML email?

Status
Not open for further replies.

Skute

Programmer
Jul 21, 2003
272
GB
Hi,

im after a way of sending an email in HTML format (including embedded images). Currently ive got it working so that i can send an email, but it sends the .html file as an attachment! Which obviously isnt very good for my needs.

If anyone has any help / advice on getting a HTML email working id love to hear it. Cheers

(Here is the code for my email sending so far)
Code:
	MapiRecipDesc DefaultRecipient =
	{
		0,
		MAPI_TO,
		"Mark Ingram",
		"SMTP:me@me.com",
		0,
		NULL
	};

  MapiFileDesc AttachedFiles = 
  {
    0,
    0,
    0,
    szTempFileName,
    ModGetFileName(pMod),
    NULL
  };

	MapiMessage MailMessage =
	{
		0,
		"Subject",
		" \nYour files are attached and ready to send with this message.\n",
		NULL,
		NULL,
		NULL,
		0,
		NULL,
    0,
    NULL,
		sizeof(AttachedFiles) / sizeof(MapiFileDesc),
		&AttachedFiles
	};

...

	(*lpfnMAPILogon)(0, NULL, NULL, MAPI_NEW_SESSION, 0, &lhSession);

	(*lpfnMAPISendMail)(lhSession, 0, &MailMessage, MAPI_DIALOG, 0);

	(*lpfnMAPILogoff)(lhSession, 0, 0, 0);

Cheers

Skute

"There are 10 types of people in this World, those that understand binary, and those that don't!"
 
Hi,

I got a big problem: I can send html emails, using Outlook Express but I can't send 'html that have pictures inside' mails.
It's anybody there that could help?
Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top