如何使用vbscript发送邮件?

如何使用vbscript发送邮件?,vbscript,email-attachments,Vbscript,Email Attachments,我需要发送一个附加到电子邮件的文件,该文件必须通过smtp服务器和auth设置到特定用户。如何在vbscript中执行此操作? 谢谢。您只需看看这里: 请尝试以下操作: Dim oMsg As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage() oMsg.From = "noone@nobody.com" oMsg.To = "someone@somewhere.com" oMsg.Subject = "Ema

我需要发送一个附加到电子邮件的文件,该文件必须通过smtp服务器和auth设置到特定用户。如何在vbscript中执行此操作?
谢谢。

您只需看看这里:

请尝试以下操作:

Dim oMsg As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage() 

oMsg.From = "noone@nobody.com" 
oMsg.To = "someone@somewhere.com" 
oMsg.Subject = "Email with Attachment Demo" 
oMsg.Body = "This is the main body of the email" 
Dim oAttch As MailAttachment = New MailAttachment("C:\myattachment.zip") 
oMsg.Attachments.Add(oAttch) 
SmtpMail.Send(oMsg)

你只需看看这里:

请尝试以下操作:

Dim oMsg As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage() 

oMsg.From = "noone@nobody.com" 
oMsg.To = "someone@somewhere.com" 
oMsg.Subject = "Email with Attachment Demo" 
oMsg.Body = "This is the main body of the email" 
Dim oAttch As MailAttachment = New MailAttachment("C:\myattachment.zip") 
oMsg.Attachments.Add(oAttch) 
SmtpMail.Send(oMsg)
我没有关于VB的vbscript的经验。。。但是谷歌给了我一个快速的提示——看起来很简单

我希望这能有所帮助:)

我对VB的vbscript没有这方面的经验。。。但是谷歌给了我一个快速的提示——看起来很简单


我希望这有帮助:)

VB.NET与VBScript不同。VB.NET与VBScript不同。你可以看到一个例子。他显示了两个不同服务器的代码。你可以看到一个例子。他显示了两个不同服务器的代码。