Click here to Skip to main content
15,910,980 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating a GUI for a C program Pin
EstC7-Apr-04 5:11
EstC7-Apr-04 5:11 
GeneralRe: Creating a GUI for a C program Pin
Ravi Bhavnani7-Apr-04 6:04
professionalRavi Bhavnani7-Apr-04 6:04 
Generalchar to BSTR Pin
roadragedave7-Apr-04 4:14
roadragedave7-Apr-04 4:14 
GeneralRe: char to BSTR Pin
Diddy7-Apr-04 4:43
Diddy7-Apr-04 4:43 
GeneralRe: char to BSTR Pin
roadragedave7-Apr-04 5:16
roadragedave7-Apr-04 5:16 
GeneralRe: char to BSTR Pin
Diddy7-Apr-04 5:24
Diddy7-Apr-04 5:24 
GeneralRe: char to BSTR Pin
PJ Arends7-Apr-04 7:00
professionalPJ Arends7-Apr-04 7:00 
QuestionMAPI - Send HTML Email? Pin
Skute7-Apr-04 4:02
Skute7-Apr-04 4:02 
Hi,

ive got an application which needs to send a HTML email with some embedded images in it.

Ive so far got the ability to send a plain text file with the .html file as an attachment, but thats no good for what i need.

Does anyone have any help or advice for getting HTML messages to work?

Here is my current code:
<br />
	MapiRecipDesc DefaultRecipient =<br />
	{<br />
		0,														                                				// Reserved<br />
		MAPI_TO,											                                				// Recipient class, MAPI_ORIG, MAPI_TO, MAPI_CC, MAPI_BCC<br />
		"Mark Ingram",										                                		// Name<br />
		"SMTP:me@me.com",		                                	// Address<br />
		0,																		                                // Size of entry identifier<br />
		NULL															                                		// Entry identifier structure<br />
	};<br />
<br />
  MapiFileDesc AttachedFiles = <br />
  {<br />
    0,                                                                    // Reserved<br />
    0,                                                                    // File flags, MAPI_OLE, MAPI_OLE_STATIC<br />
    0,                                                                    // Position to place file in message body<br />
    szTempFileName,                                                       // Fully qualified path of file<br />
    ModGetFileName(pMod),                                                 // Filename<br />
    NULL                                                                  // File type<br />
  };<br />
<br />
	MapiMessage MailMessage =<br />
	{<br />
		0,																		                                // Reserved<br />
		"Subject",                               					// Subject<br />
		" \nYour files are attached and ready to send with this message.\n",	// Email body<br />
		NULL,																	                                // Message type (IPM)<br />
		NULL,																                                	// Data received<br />
		NULL,															                                		// Conversation thread ID<br />
		0,																                                		// Flags - MAPI_RECEIPT_REQUESTED, MAPI_SENT , MAPI_UNREAD <br />
		NULL,															                                		// Sender - MapiRecipDesc structure<br />
		//sizeof(DefaultRecipient) / sizeof(MapiRecipDesc),			          			// Number of recipients<br />
		//&DefaultRecipient,												                        		// Recipients structure<br />
    0,                                                                    // Number of recipients<br />
    NULL,                                                                 // Recipients structure<br />
		sizeof(AttachedFiles) / sizeof(MapiFileDesc),	            						// Number of attached files<br />
		&AttachedFiles	  										                            		// Attached files structure<br />
	};<br />
<br />
...<br />
<br />
	(*lpfnMAPILogon)(0, NULL, NULL, MAPI_NEW_SESSION, 0, &lhSession);<br />
<br />
	ulReturn = (*lpfnMAPISendMail)(lhSession, 0, &MailMessage, MAPI_DIALOG, 0);<br />
<br />
	(*lpfnMAPILogoff)(lhSession, 0, 0, 0);<br />


Cheers

Skute
AnswerRe: MAPI - Send HTML Email? Pin
David Crow7-Apr-04 5:46
David Crow7-Apr-04 5:46 
GeneralRe: MAPI - Send HTML Email? Pin
Skute7-Apr-04 5:54
Skute7-Apr-04 5:54 
GeneralRe: MAPI - Send HTML Email? Pin
David Crow23-Apr-04 9:04
David Crow23-Apr-04 9:04 
AnswerRe: MAPI - Send HTML Email? Pin
PJ Arends7-Apr-04 7:04
professionalPJ Arends7-Apr-04 7:04 
GeneralRe: MAPI - Send HTML Email? Pin
Skute7-Apr-04 7:37
Skute7-Apr-04 7:37 
GeneralRe: MAPI - Send HTML Email? Pin
PJ Arends7-Apr-04 13:41
professionalPJ Arends7-Apr-04 13:41 
GeneralRe: MAPI - Send HTML Email? Pin
Skute7-Apr-04 22:35
Skute7-Apr-04 22:35 
GeneralRe: MAPI - Send HTML Email? Pin
Skute7-Apr-04 23:15
Skute7-Apr-04 23:15 
Generalpassing by reference in c Pin
kfaday7-Apr-04 3:55
kfaday7-Apr-04 3:55 
GeneralRe: passing by reference in c Pin
Skute7-Apr-04 4:06
Skute7-Apr-04 4:06 
GeneralRe: passing by reference in c Pin
kfaday7-Apr-04 4:13
kfaday7-Apr-04 4:13 
GeneralRe: passing by reference in c Pin
Paul Ranson7-Apr-04 5:53
Paul Ranson7-Apr-04 5:53 
GeneralRe: passing by reference in c Pin
kfaday8-Apr-04 4:32
kfaday8-Apr-04 4:32 
GeneralCListCtrl hwnd 0x00 Pin
ns7-Apr-04 3:28
ns7-Apr-04 3:28 
GeneralRe: CListCtrl hwnd 0x00 Pin
RChin7-Apr-04 4:54
RChin7-Apr-04 4:54 
GeneralThanks! Pin
ns7-Apr-04 5:25
ns7-Apr-04 5:25 
GeneralTool bar with Slider Pin
Cedric Moonen7-Apr-04 3:26
Cedric Moonen7-Apr-04 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.