I 'm developing a Windows form application (vb.net). I need to "interface" my application with Microsoft Outlook, in particolary I need to create a new Outlook message with some informations already filled: From, To, Subject, some attached files, .... then, user will write email body and then he will send the message.
Could you please elaborate your statement “Interface with Microsoft Outlook”? I would like to share that Aspose.Email for .NET is an API that does not depend on Microsoft Outlook for its functionality and your requirements can be met without the need of using Microsoft Outlook.
The API’s MailMessage class allows you to compose a new message and specify its properties like From, To, Subject, Body, etc. as well as add attachments to the message. Once all the required parameters are specified, you can use the SmtpClient class to send the email; all without using Microsoft Outlook. Please refer to our documentation section “Sending Email Messages with Smtp” for sample code in this regard.
Your elaboration about your requirements will help us assist you further in this regard.
I click a button on my windows form and I have to show the "session/windows" as I click New Message in Outlook, with some fileds filled (From, To, subject,...).
It is possible to create a message in draft mode using Aspose.Email, sve it on disc and then open it in Outlook directly from the c# application. Following sample code demonstrates this feature:
The MailMessage class allows you to add an attachment of any type to the message. Please have a look at the following code sample for your kind reference and let us know if we can be of any additional help to you in this regard.
Sample Code:
MailMessage msg = new MailMessage();
msg.Attachments.Add(new Attachment("DwnloadedMsg.msg"));
msg.Save("MsgWithAt.msg", MailMessageSaveType.OutlookMessageFormatUnicode);