以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助] 邮件发送错识  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=186327)

--  作者:sanny
--  发布时间:2023/4/22 13:10:00
--  [求助] 邮件发送错识
老师,错哪儿 ?

Dim o As New Microsoft.Office.Interop.Outlook.Application
Dim msg As Microsoft.Office.Interop.Outlook.MailItem
msg = o.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
msg.Recipients.Add("sum@aa.com")




For Each dr As DataRow In DataTables("表A").Select("到期日期<= #" & Date.Today.AddDays(10) & "#")
    o.To = dr("sum@aa.com")
    o.Title = "催款通知"
    o.Content = dr("姓名") & dr("尊称") & ":" & ln & "您的贷款将于" & dr("到期日期") & "到期, "
    o.Content = m.Content & "金额为" & dr("金额") & "元, 请准时还款!" & ln & "某某公司" & vbcrlf & Date.today
    o.SendAsync()
Next

MSGBOX("DONE")

--  作者:有点蓝
--  发布时间:2023/4/22 14:05:00
--  
我也不懂