开发者

Easy way to invoke standard mail client from c++ with recipient adress and subject?

开发者 https://www.devze.com 2023-01-18 15:30 出处:网络
The answer from TcKs gave me an idea, thus i tried following: system(\"mailto:thomas.muster@domainname.com?subject=Test\");

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!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号