LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Launching default email client?

Solved!
Go to solution
Is there a library function to have a CVI application launch the default email client?  I can get pretty close to what I want using InetLaunchDefaultWebBrowser(), as below:

InetLaunchDefaultWebBrowser ("mailto:support@example.com");

But it would be nice if I didn't have to launch the user's web browser as an intermediate step.  Thanks.
0 Kudos
Message 1 of 3
(3,897 Views)
Solution
Accepted by tstanley

you can try ShellExecute (Shell32.Lib must be included in your CVI project)

 

example:

ShellExecute(0/*handle*/, "", "mailto:support@example.com", NULL, NULL, SW_SHOWNORMAL);

 

it is  work on XP perfectly (thunderbird on my PC), but i am not sure about working on win2000 and older system

 

Message 2 of 3
(3,873 Views)
I was able to get it to work.  I also had to include shellapi.h and windows.h to get the function prototype and the proper macros.  After that your code worked perfectly on XP Pro (launched Outlook 2007).  Thanks for the help!
0 Kudos
Message 3 of 3
(3,862 Views)