Link to home
Start Free TrialLog in
Avatar of ken355
ken355

asked on

mailto URL scheme not attaching attachment file

with the following segment of code i am able to open local email, populate the To: and Subject fields but it does not attach the attachment file. The attachment file does exists, any ideas as to why it is not working?

wsprintf(pcURL, "mailto://toaddress@url.com?subject=THIS IS THE SUBJECT&attachment=c:\\Attachment.png");

if( (int) ShellExecute(NULL, "open", pcURL, NULL, NULL, SW_SHOWNORMAL) <= 32 )
 MessageBox(hMainWin, "Unable to open local mail client.", "Mail client error", MB_OK | MB_ICONWARNING);
Avatar of adnanj76
adnanj76

mailto://toaddress@url.com?subject=THIS IS THE SUBJECT&attachment=c:\\Attachment.png"

try using forward slash c:/ or c://
ASKER CERTIFIED SOLUTION
Avatar of pgnatyuk
pgnatyuk
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ken355

ASKER

Yes Microsoft did publish a kb on it, for security purposes you can no longer do it
Thanks