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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to open mail client? 1

Status
Not open for further replies.

TonyGroves

Programmer
Aug 13, 2003
2,389
IE
I want to write a procedure that will create a file, then open the default mail client program, creating a new message with the file attached, ready for the user to fill in the address and cover note and send. Since this is a popular feature in many applications, I presume there's a simple standard way to do it, but I just can't find out how! Can anybody help please?

Thanks a lot.

Tony.
 
Thanks for that. That article is about mailing directly from the app using SMTP, which is really a different thing altogether. I've heard the term MAPI (Messaging API) used in relation to what I'm looking for, but the MAPI help files don't seem to cover that territory at all.
 
Your second link did the job, thanks!

I was able to condense it down to:
[tt]
#include <mapi.hpp>
TMapiRecipDesc to={0,MAPI_TO,0,"test@test.com",0,0};
TMapiFileDesc attach={0,0,-1,"c:\\temp\\test.emf",0,0};
TMapiMessage msg={0,0,0,0,0,0,0,0,1,&to,1,&attach};
MapiSendMail(0,0,msg,MAPI_DIALOG,0);
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top