Open the Default Email Progam to Send Email (VB.NET)

Category:
C#, VB.NET, ASP.NET
Type:
Snippets
Difficulty:
Beginning
Author:
Intelligent Solutions Inc.

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
To use this function, you can pass an e-mail address to it, and optionally, a subject or body, e.g.,

OpenEmail "feedback@freevbcode.com", "Hello", "We really like your web site."

This will open the default e-mail program and contstruct a new message to feedback@freevbcode.com, a subject of "Hello", and a message body of "We really like your web site."

You can also use the "mailto:" + the email address if you prefer, and you can omit the subject and/or the body.

You can find the VB 6 version of this function at http://www.freevbcode.com/ShowCode.Asp?ID=80

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: