如何用vb 写一个发信软件 ?

来源:百度知道 编辑:UC知道 时间:2024/06/05 03:08:58
纯属研究~~~
比如说把c:盘下的123.txt发到我的邮箱,怎么用vb代码实现?
谢谢了~~~
比如,我要把c:盘下的123.txt发到我的邮箱123@163.com

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

Private Sub Command1_Click()
Debug.Print "mailtoomeName@Somewhere.com?subject=MySubject&Attach=""""c:\123.txt"""""
Call ShellExecute(Me.hwnd, "open", _
"mailtoomeName@Somewhere.com?subject=MySubject&Attach=""c:\123.txt""", _
vbNullString, vbNullString, SW_SHOW)
End Sub

Jmail控件