メールのやり方を変える必要がありました。1.1 バージョンは system.WEB.mail を使用し、
Imports System.Web.Mail
'
Dim message As New MailMessage' this is a web.mail msg, not a net.mail msg
Dim objConn As SmtpMail
Dim objAttach As MailAttachment
'
message .From = "From@us.com"
' more properties assigned to objMail
objAttach = New MailAttachment(ExportName)
message.Attachments.Add(objAttach)
' Here's where we actually send the thing
SmtpMail.SmtpServer.Insert(0, "127.0.0.1")
objConn.Send(objMail)
新しいものにはsystem.NET.mailがあります
Imports System.Net.Mail
'
Dim message as MailMessage ' this is a net.mail msg, not a web.mail msg
Dim data As Attachment
Dim client As New SmtpClient("127.0.0.1")
'
data = New Attachment(ExportName)
' Create the message and add the attachment
message = New MailMessage(EmailFrom, EmailTo, reportDescription)
message.Attachments.Add(data)
' Send the message
client.Send(message)