简体   繁体   中英

Sending an email from outlook in c#

I am following this guide and havent got very far

http://www.c-sharpcorner.com/UploadFile/casperboekhoudt/SendingEmailsThroughOutlook12052005000124AM/SendingEmailsThroughOutlook.aspx

I am getting stuck here

Now that we have the MAPI namespace, we can log on using using:

.Logon(object Profile, object Password, object ShowDialog, object NewSession)

Profile: This is a string value that indicates what MAPI profile to use for logging on. Set this to null if using the currently logged on user, or set to an empty string ("") if you wish to use the default Outlook Profile.

All i want to do from my programme is take the email address i already have in a variable and open up a new outlook email window with that email address in the too section.

Thanks very much.

This document on CodeProject shows how to open the default mail client.

http://www.codeproject.com/KB/dotnet/Default_mail_client.aspx

Check this list for common Outlook tasks.

I'm using the send attachments

It was quite easy to set up Outlook email capabilities to send reports in one of my apps following the one titled "HOW TO: Use the Microsoft Outlook Object Library to send a message that has attachments by using Visual C# .NET".

Good Luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM