Open Email Client from Windows Forms

  • Thread starter Thread starter R-D-C
  • Start date Start date
R

R-D-C

Hi,

I have a windows forms application which shows an email address in a
LinkLabel. I want it so that when you click the link it shows your email
client with the To: box completed automatically. Up to now I haven't found
how you launch the email client in this way.

Has anybody else done this?
 
* "R-D-C said:
I have a windows forms application which shows an email address in a
LinkLabel. I want it so that when you click the link it shows your email
client with the To: box completed automatically. Up to now I haven't found
how you launch the email client in this way.

\\\
Dim psi As New ProcessStartInfo()
With psi
.FileName = "mailto:[email protected]"
.UseShellExecute = True
End With
Process.Start(psi)
///
 
Thanks Eric, this works a charm :-D.

I actually used the line...

System.Diagnostics.Process.Start(@"mailto:" + EmailAddressInput.Text);

....in the end where EmailAddressInput is a link label showing the email
address.

It was one of those things that you put in the specification thinking it
will be bread and butter stuff. (As it turned out to be). Took a bit of
finding a solution though.

Thanks again
 
Back
Top