This is the easy way :
using System.Diagnostics;
string toEmail = "de**@publicjoe.co.uk";
string subject = "Love the Program";
string body = "Thanks a lot";
string message = string.Format( "mailto:{0}?subject={1}&body={2}", toEmail,
subject, body );
Process.Start( message );
Add this to a linklabel and bobs your uncle.
Example app can be found at
http://www.publicjoe.f9.co.uk/csharp/snip/snip007.html
Hope this helps
Publicjoe
C# Tutorial at
http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at
http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at
http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html
VB Ebook at
http://www.publicjoe.f9.co.uk/vbnet/samples/ebook.html
"Heinz Z." <no****@irgendwas.de> wrote in message
news:#j**************@TK2MSFTNGP10.phx.gbl...
Hello,
I need a function to send a mail from a winform application. I don't
belive, that I can use smtp, because I neither know the mail address of the sender
nor the smtp server (or can it be "localhost" ?). I only want to set the
receiver mail address (it's me), the subject and the body text. And I want
to send the mail with the default mail client of the user.
How can I do that ?
With regards
Heinz