Easy way to call a standard email client from C ++ with the recipient address and subject?

The answer from TcK gave me an idea, so I tried the 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 worked. Do you have a simple solution?

Thanks!

0
source share
1 answer

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

+3
source

Source: https://habr.com/ru/post/1337361/


All Articles