Foxtable(狐表)用户栏目专家坐堂 → [分享]用Outlook发送邮件的内部函数


  共有3212人关注过本帖树形打印复制链接

主题:[分享]用Outlook发送邮件的内部函数

帅哥哟,离线,有人找我吗?
hotday1972
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:430 积分:2889 威望:0 精华:0 注册:2015/4/28 21:12:00
[分享]用Outlook发送邮件的内部函数  发帖心情 Post By:2015/6/19 6:20:00 [显示全部帖子]

  

有点罗嗦,请高手把参数空值赋值为1个空格这段简化下,多谢!

 

内部函数代码如下: 

Dim Receiver As String = Args(0)    '必须是邮箱地址,多个地址之间用";"分开

Dim Cc As String = Args(1)          '必须是邮箱地址,多个地址之间用";"分开

Dim Bcc As String = Args(2)         '必须是邮箱地址,多个地址之间用";"分开

Dim Subject As String = Args(3)

Dim Body As String = Args(4)

Dim Proc As New Process

'函数参数如果为空值,则赋值为空格,避免调用mailto出错

If Receiver Is Nothing Then

    Receiver = " "

End If

If Cc Is Nothing Then

    Cc = " "

End If

If Bcc Is Nothing Then

    Bcc = " "

End If

If Subject Is Nothing Then

    Subject = " "

End If

If Body Is Nothing Then

    Body = " "

End If

Proc.File = "mailto:" & Receiver & "?cc=" & Cc & "&bcc=" & Bcc & "&subject=" & Subject & "&body=" & Body

Proc.Start()


 回到顶部