0

The answer from TcKs gave me an idea, thus i tried following:

system("mailto:thomas.muster@domainname.com?subject=Test");

and

    STARTUPINFO info = {sizeof(info)};
    PROCESS_INFORMATION processInfo = {0};
    if (!::CreateProcess(NULL, "mailto:thomas.muster@domainname.com",
        NULL, NULL, FALSE, 0, NULL, NULL, &info, &processInfo))
    {
        MessageBox("Couldn't invoke Standard Mail Client");
        return;
    }

But neither the first nor the second form did work. Do you have any simple solution?

Thanks!

Community
  • 1
  • 1
Christian Ammer
  • 7,464
  • 6
  • 51
  • 108

1 Answers1

3

Try the ShellExecute function: http://support.microsoft.com/kb/224816

Šimon Tóth
  • 35,456
  • 20
  • 106
  • 151
  • 2
    std::wstring mail = L"mailto:thomas.muster@domainname.com"; ShellExecute(NULL, L"open", mail.c_str(), NULL, NULL, SW_SHOWNORMAL); – anno Oct 05 '10 at 11:44
  • 1
    Doesn't work for me. Opens a blank Chrome tab. – M Katz Dec 11 '20 at 01:43