用Shell函数来发送邮件!代码如何写啊

解决方案 »

  1.   

    shell "邮件客户端软件发信的命令行"
      

  2.   

    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 LongPrivate Sub cmdSend_Click()
        ShellExecute hwnd, _
            "open", _
            "mailto:" & txtTo.Text & _
            "?cc=" & txtCc.Text & _
            "&bcc=" & txtBcc.Text & _
            "&subject=" & txtSubject.Text & _
            "&body=" & Replace(txtMessage.Text, vbCrLf, _
                "%0D%0A"), _
            vbNullString, vbNullString, _
            SW_SHOW
    End Sub