Solved

Pop up user mail

Posted on 2009-07-05
4
180 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

724 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