471,582 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,582 software developers and data experts.

Send mail from C# using e.g. outlook

Hi,

I wood like to be able to setup an email using outlook (or other email
program) from C#, setting up the subject field and write some start text in
the message body.

Normally I would use LaundProcess("mailto:fo*@bar.dk"), but this time I do
not know the recipient and I have to fill out the subject and parts of the
body. The user will have to type in the recipient and add som ekstra text to
the message body.
Nov 17 '05 #1
2 2350
Do a search on Outlook Automation (msdn.microsoft.com has some examples).

I just finished a job for a customer of my client that needed this sort of
functionality.

Worked a treat.

"Jesper" <Je****@discussions.microsoft.com> wrote in message
news:F1**********************************@microsof t.com...
Hi,

I wood like to be able to setup an email using outlook (or other email
program) from C#, setting up the subject field and write some start text
in
the message body.

Normally I would use LaundProcess("mailto:fo*@bar.dk"), but this time I do
not know the recipient and I have to fill out the subject and parts of the
body. The user will have to type in the recipient and add som ekstra text
to
the message body.

Nov 17 '05 #2
You have a number of options here. If you want you could use Outlook
automation but this requires that the user of your application has
Outlook... however, have a look at Visual Studio Tools For Office 2.0 (VSTO
2).

Alternatively you could just create a Windows Form that replicates a
standard new email dialog and then the user can fill in the details there,
click on a send button on it, and your application can send it using classes
in the System.Web.Mail namesapce such as SmtpMail, MailMessage, and
MailAttachment.

Hope this Helps

Brian Delahunty
Ireland

"Jesper" wrote:
Hi,

I wood like to be able to setup an email using outlook (or other email
program) from C#, setting up the subject field and write some start text in
the message body.

Normally I would use LaundProcess("mailto:fo*@bar.dk"), but this time I do
not know the recipient and I have to fill out the subject and parts of the
body. The user will have to type in the recipient and add som ekstra text to
the message body.

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Google Mike | last post: by
reply views Thread by David Burson | last post: by
2 posts views Thread by Ronny Sigo | last post: by
15 posts views Thread by cj | last post: by
14 posts views Thread by Professor Yonce | last post: by
9 posts views Thread by Mahernoz | last post: by
5 posts views Thread by pat | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
1 post views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.