Solved

Pop up user mail

Posted on 2009-07-05
4
175 Views
Last Modified: 2013-12-14
Hi,
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

0
Comment
Question by:fructuoso
  • 2
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 24780096
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.");
 
  ShellExecute(NULL,_T("open"),pszCmd,NULL,NULL,SW_SHOW);
}

Open in new window

0
 

Author Comment

by:fructuoso
ID: 24780178
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.
0
 
LVL 86

Expert Comment

by:jkr
ID: 24780188
>>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.
0
 

Author Comment

by:fructuoso
ID: 24780250
Thank you. I will test it
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question