Tip 36

How do I write code that sends a mail via outlook express?

Ans: Create a Windows application and place a button named sendmail and a text box named emailaddr on the form. On adding the email address to the text box if sendmail button is clicked ‘OutLook Express’ dialog box should get popped up with an email address written in the text box. To get so write following code in the button handler.

Private Sub sendmail_Click ( ByVal sender As System.Object, ByVal e As System.EventArgs ) Handles mailsend.Click

If emailaddr.Text = “” then

MessageBox.Show ( “Enter The Email Address” )
Return

End If
System.Diagnostics.Process.Start ( “mailto:” & emailaddr )

End Sub

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>