CodeItBetter Programming Another VB Programming Blog

How to send mail with its default application

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
'Internet - How to send mail with its default application
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
    ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
    ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOW = 5
 
Public Sub SendEmail(EMailAddress As String)
    ShellExecute 0&, "open", "mailto:" & EMailAddress, vbNullString, vbNullString, SW_SHOW
End Sub
Filed under: Internet Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.