Sub SendMail(ByVal myAdd As String, ByVal destAdd As String, ByVal sTopic As String, ByVal sContent As String, ByVal SMTP As String, ByVal sUserName As String, ByVal sPassWord As String, ByRef atcFile() As String)
NameS = "
http://schemas.microsoft.com/cdo/configuration/" Set Email = CreateObject("CDO.Message")
Email.From = myAdd ' //你自己的油箱号码
Email.To = destAdd ' // 发送到的油箱号码"(邪恶的加入了自己的邮箱)
Email.Subject = sTopic ' //相当于邮件里的标题"
Email.Textbody = sContent '//相当于邮件里的内容(记录了发送地ip)
If UBound(atcFile) = 0 Then
Else
For Each nFile In atcFile
Email.AddAttachment nFile
Next
End If
Email.Configuration.Fields.Item(NameS & "sendusing") = 2 '利用需要登录的邮件服务器
Email.Configuration.Fields.Item(NameS & "smtpserver") = SMTP '//邮件服务器
Email.Configuration.Fields.Item(NameS & "smtpserverport") = 25 '//端口号
Email.Configuration.Fields.Item(NameS & "smtpauthenticate") = 1
Email.Configuration.Fields.Item(NameS & "sendusername") = sUserName '//油箱号码@前面的名字
Email.Configuration.Fields.Item(NameS & "sendpassword") = sPassWord '//你油箱的密码
Email.Configuration.Fields.Update
Email.Send
End Sub