• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

Sending an email from an VC++ 6 Dialog based MFC program

I am currently writng a program which creates a configuration file e.g config.txt and stores it on a users machine. What I want to do is send this file via email to an email account. I know there is MAPI functions etc. to do this but does anyone know of a simple way to do this other than MAPI

Also I tried using ShellExecute to open the default email as follows
ShellExecute(dlg,NULL,"mailto:email@account.com?subject=Configuration File","NULL",NULL,SW_SHOWNORMAL);

However this only sets the send to: and subject up not the attachment is there a way to attach the file with shellexecute

Any hints or sample code would be great

1 Solution
You mean a way other than MAPI?  MAPI is for this....
LizardKingAuthor Commented:
Edited text of question.
No. The mailto URI provides no way to specify an attachment. You need to use MAPI, or use some other way to control your mail program, or use SMTP directly.

..B ekiM

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now