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

Subscribe / Share

It's very calm over here, why not leave a comment?

Leave a Reply




Categories

Powered by Yahoo! Answers