Tools Links Login

Mailto Command

Easy way to create a new email with Subject,Body and Attachment, using the default email program!!!

Original Author: Alan Lammers SoƱez

Inputs

Subject,Body and Attahment

API Declarations

Public 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

Code

Public Function SendMail(ByVal MailAddress As String, ByVal MailSubject As String, ByVal MailBody As String, ByVal MailAttach As String)
ShellExecute 0&, vbNullString, "mailto: " & MailAddress & _
"&subject=" & MailSubject & _
"&body=" & MailBody & _
"&attach=" & Chr(34) & MailAttach & Chr(34) _
, vbNullString, vbNullString, vbHide
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 90 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.