Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Possible to launch outlook and add an attachment?

Posted on 2006-06-09
2
Medium Priority
?
292 Views
Last Modified: 2008-03-17
hello,

We are supposed to come up with a way to launch outlook and add an attachment progamatically. We don't have to worry about any other mail clients at this time. We don't want to use SMTPMail. Is it possible to add an attachment? I know how to use their default mail client and create a mail using mailto (like below) but as far as I know, for security reasons, mailto will not allow attachments.

using System.Text;
using System.Diagnostics;

...

string toEmail = "testr@test.com";
string subject = "This is a test Subject";
string body = "This is a test email message";
string message = string.Format("mailto:{0}?subject={1}&body={2}",     toEmail, subject, body);

Process.Start(message);

But I don't think i'll get anywhere with this. Any ideas?

Thanks!
0
Comment
Question by:PoeticAudio
2 Comments
 
LVL 2

Accepted Solution

by:
bdsmithback earned 2000 total points
ID: 16872850
You can use the Outlook Object Library

http://support.microsoft.com/default.aspx?id=310263
0
 
LVL 6

Author Comment

by:PoeticAudio
ID: 16885334
Thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question