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

Pop up user mail

I would like to know how can i pop up the default email box of a user when there is an error in an (my) application. In the mail it will have my mailing adress and a default message which can be rewrite by the user.
If you have any ideas it will help me a lot
Thank you

  • 2
  • 2
1 Solution
The easiest way would probably be to use 'ShellExecute()' (http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx), e.g.

#include <tchar.h>
#include <shellapi.h>
void SendErrorMail()
  LPCTSTR pszCmd = _T("mailto:joeuser@foo.com&subject=Error&body=An error has occured.");

Open in new window

fructuosoAuthor Commented:
Thank you for you reply.
I was thinking about this solution. So if you do that it will open the message but not send it ? The user will have the possibility to send it or not.
>>So if you do that it will open the message but not send it ? The user will have
>>the possibility to send it or not.

Yes, that is exactly what should happen, regardless of any mail client your user is using as the default one.
fructuosoAuthor Commented:
Thank you. I will test it
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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