Dim smtp As New System.Net.Mail.SmtpClient(dz.Text,dk.Text)
smtp.Credentials = New System.Net.NetworkCredential(zh.Text,mm.Text)
Dim mail As New System.Net.Mail.MailMessage()
mail.Subject = zt.Text
mail.SubjectEncoding = System.Text.Encoding.GetEncoding("GB2312")
mail.BodyEncoding = System.Text.Encoding.GetEncoding("GB2312")
mail.From = New System.Net.Mail.MailAddress(fj.Text)
mail.Priority = System.Net.Mail.MailPriority.Normal
mail.IsBodyHtml = True
mail.Body = nr.Text
mail.To.Add(sj.Text)
Dim attachment As new System.Net.Mail.Attachment("d:\sjk\" & Tables("成本需求单").current("附件明细"), System.Net.Mime.MediaTypeNames.Application.Octet)
mail.Attachments.Add(attachment)
此主题相关图片如下:22.png
此主题相关图片如下:11.png
应该是这句代码报错:"d:\sjk\" & Tables("成本需求单").current("附件明细"), 老师们帮忙看看,因为有时会带两个及两个以上的附件~~