Thanks a lot!
Main Topics
Browse All TopicsHi,
Can some one give me a sample code or library (may be commercial) that allows my program to open new message in edit window and attach some file(s) in default mail client installed (Like as if you right-click a file in Windows explorer and clicked "Send to").
Thanks in advance!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: jkrPosted on 2003-10-10 at 07:07:03ID: 9527780
See http://msdn.microsoft.com/ library/de fault.asp? url=/libra ry/ en-us/m api/html/ _ mapi1book_ sending_a_ message_si mply_simpl e_mapi_sam ple.asp ("Sending a Message Simply: Simple MAPI Sample")
library/de fault.asp? url=/libra ry/ en-us/m api/html/ _ mapi1book_ controlled _sending_o f_a_messag e_simple_m api_sample .asp ("Controlled Sending of a Message: Simple MAPI Sample")
library/de fault.asp? url=/libra ry/ en-us/m api/html/_ mapi1book_ sending_a_ message_cm c_sample.a sp ("Sending a Message: CMC Sample")
library/de fault.asp? url=/libra ry/ en-us/s hellcc/pla tform/shel l/programm ersguide/s hell_int/ s hell_int_e xtending/e xtensionha ndlers/ con textmenuha ndlers.asp ("Creating Context Menu Handlers ")
// Example 1:
// Send a mail message containing a file and prompt for
// recipients, subject, and note text.
ULONG err;
MapiFileDesc attachment = {0, // ulReserved, must be 0
0, // no flags; this is a data file
(ULONG)-1, // position not specified
"c:\\tmp\\tmp.wk3", // pathname
"budget17.wk3", // original filename
NULL}; // MapiFileTagExt unused
// Create a blank message. Most members are set to NULL or 0 because
// MAPISendMail will let the user set them.
MapiMessage note = {0, // reserved, must be 0
NULL, // no subject
NULL, // no note text
NULL, // NULL = interpersonal message
NULL, // no date; MAPISendMail ignores it
NULL, // no conversation ID
0L, // no flags, MAPISendMail ignores it
NULL, // no originator, this is ignored too
0, // zero recipients
NULL, // NULL recipient array
1, // one attachment
&attachment}; // the attachment structure
err = MAPISendMail (0L, // use implicit session.
0L, // ulUIParam; 0 is always valid
¬e, // the message being sent
MAPI_DIALOG, // allow the user to edit the message
0L); // reserved; must be 0
if (err != SUCCESS_SUCCESS )
printf("Unable to send the message\n");
and
http://msdn.microsoft.com/
http://msdn.microsoft.com/
Do you want the 'Explorer' like functionality also? Then see http://msdn.microsoft.com/