I just want to open the outlook "New Email" window and populate with multiple attachments, I figure Process.Start would be easier than SMTP because I don't have to pass in my SMTP server. My original plan was to use Microsoft.Office.Interop.Outlook, but since I am running my application as administrator, I had to rule this option out.
This is what I have so far, it only takes one attachment, is it possible I can pass in a second argument (fn2) after fn?
static void Main(string[] args)
{
string programFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
var selectedApplicationPath = Directory.GetFiles(programFilesPath, "Outlook.exe", SearchOption.AllDirectories);
if (selectedApplicationPath.Length <= 0) return;
var outlookProcessPath = selectedApplicationPath[0];
if (string.IsNullOrWhiteSpace(outlookProcessPath)) return;
string fn = @"path1";
string fn2 = @"path2";
Process.Start(outlookProcessPath, "/a \"" + fn + "\"");
}