Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Pop up user mail

Posted on 2009-07-05
4
Medium Priority
?
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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 the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

636 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