VB.net 调用OutLook发邮件(程序自动添加附件) 您所在的位置:网站首页 vb发送邮件带附件 VB.net 调用OutLook发邮件(程序自动添加附件)

VB.net 调用OutLook发邮件(程序自动添加附件)

2024-02-01 09:42| 来源: 网络整理| 查看: 265

        Dim rkey As Microsoft.Win32.RegistryKey        Dim path As String        Dim subject As String        Dim EmailTo As String        Dim AttachPath As String

        rkey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("mailto/shell/open/command")  '取得Outlook程序位置        If rkey IsNot Nothing Then            path = rkey.GetValue("").ToString() & " "            path = path.Substring(0, path.IndexOf(" "))            path = path.Replace("""", "")            rkey.Close()            Try                subject = "hello"                EmailTo = "[email protected]"                AttachPath = "c:/sss.txt"                System.Diagnostics.Process.Start(path, "-c IPM.Note /m " & EmailTo.Trim & "&subject=" & subject.Trim & " " & AttachPath.Trim)            Catch ex As Exception

            End Try        End If 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有