Dim m As New MailSender
Dim ln As String = vbcrlf & vbcrlf '定义两个换行
m.Host = "smtp.ce-service.com.cn"
m.Account = "qingqiang.zhang@ce-service.com.cn"
m.Password = "Qing@1104"
m.From = "qingqiang.zhang@ce-service.com.cn"
Dim dr As DataRow
dr = DataTables("合同签收表").Find("项目号 = '180125'")
m.AddReceiver("lucy.guo@ce-service.com.cn")
m.AddReceiver("qingqiang.zhang@ce-service.com.cn")
m.Title = "合同签收通知"
m.Content = dr("销售") & "您好" & ":" & ln & dr("客户名称") & "的" & dr("项目内容") & "已收回" & dr("份数") & "份合同,请知悉!"
m.SendAsync()
在这段代码里面在加一些什么可以提示发送成功或者失败呢!就是弹出个对话框,显示“你的邮件已经发送成功”“你的邮件发送失败!”