使用com object 控制outlook

//z 2012-07-13 16:12:03 [email protected][T23,L172,R6,V228]

dynamic app = Activator.CreateInstance(Type.GetTypeFromProgID("Outlook.Application"));
dynamic email = app.CreateItem(0);
email.Subject = "Subject";
email.Body = "Text";
email.To = "[email protected]";
email.Save();
email.Attachments.Add(@"E:\Myimage.jpg");
email.Display(true); //use this to display the Outlook-window
email.Send(); //use this to send the email directly

你可能感兴趣的:(object,email)