Good Evening,
I'm working on a program that will allow user input and will take that input, insert it into blank spots into an email template, and then prepopulate the email template in Outlook so all an analyst would need to do is click a the send button - basically a dummy proof program to send emails to customers.
Creating the interface and reading the information entered isn't an issue; however, I just figured out how to get an email to open but have no idea how to format the body. The below code I just happened upon at https://stackoverflow.com/questions/25189365/shellexecute-for-mailto-doesnt-work-with-google-chrome which managed to get the email to open as long as Outlook is already open. The problem is, I have no idea what the shellExecute line is or how to manipulate it to add user provided information into an outlook email template file. Does anyone know of any resources that are available that would provide information on chopping up an outlook template file and injecting data into the template?
Here's the code I have that opens a blank email:
#include "stdafx.h"
#include <iostream>
#include <shlobj.h>
#include <shlwapi.h>
#include <objbase.h>
int main()
{
LPCTSTR addr = L"mailto:myaddress@gmail.com";
ShellExecute(0, _T("open"), addr, NULL, NULL, SW_SHOWNORMAL);
return 0;
}