Dim msg As New System.Web.Mail.MailMessage() msg.To = [email protected] '目标邮箱
msg.Subject = ...
msg.Body = ...
msg.Cc = ""
... ' Add attachments to the msg
Dim serverpath As String = ... '附件路径
Dim attachment As New System.Web.Mail.MailAttachment(serverpath)
msg.Attachments.Add(attachment)
System.Web.Mail.SmtpMail.SmtpServer = "10.172.100.100" 'SMTP服务器地址
System.Web.Mail.SmtpMail.Send(msg)
msg.Subject = ...
msg.Body = ...
msg.Cc = ""
... ' Add attachments to the msg
Dim serverpath As String = ... '附件路径
Dim attachment As New System.Web.Mail.MailAttachment(serverpath)
msg.Attachments.Add(attachment)
System.Web.Mail.SmtpMail.SmtpServer = "10.172.100.100" 'SMTP服务器地址
System.Web.Mail.SmtpMail.Send(msg)
服务器怎么得来的?
我的是127.0.0.1 那么是否可以通过httpport2次代理才行呢?
不要制定端口吗?
msg.Subject = ...;
msg.Body = ...;
msg.Cc = "";
... // Add attachments to the msg
string serverpath= ... ; //附件路径
System.Web.Mail.Mailattachment attachment = New System.Web.Mail.MailAttachment(serverpath);
msg.Attachments.Add(attachment);
System.Web.Mail.SmtpMail.SmtpServer = "10.172.100.100"; //SMTP服务器地址
System.Web.Mail.SmtpMail.Send(msg);
,你的那个smtp服务器如果变了怎么办?一个smtp服务器可以传给
不同网站的email吗??
我的网络知识还不多,请指教
SMTP服务器变了你就改地址
你用OUTLOOK时SMTP服务器地址变了你不是也要改地址的吗:)