The program that executes the vbs script file is under the System32 file.
The following vbs script code completes sending an email to chen@gmail.com with the kekec@qq.com account ".
1 namespace = "http://schemas.microsoft.com/cdo/configuration"
2 set email = Createobject ("CDO. Message ")
3 email. From = "chen@gmail.com" 'mail address
4 email. To = "kekec@qq.com" 'email address
5 email. Subject = "test _" + CSTR (now () 'Email Subject
6 email. textbody = "OK! It is only a test. "'mail content
7 email. addattachment "D: \ My Documents \ my pictures \ 809041233006998.jpg" 'attached
8 with email. configuration. Fields
9. Item (namespace & "sendusing") = 2 'cdo sending port number
10. Item (namespace & "smtpserver") = "smtp.gmail.com" 'smtp Server
11. Item (namespace & "smtpserverport") = 465 'smtp server port number
12. Item (namespace & "smtpusessl") = true 'whether the SMTP server uses SSL
13. Item (namespace & "smtpauthenticate") = 1' the authentication method is basic
14. Item (namespace & "sendusername") = "chen@gmail.com" 'sender email account
15. Item (namespace & "sendpassword") = "*************" 'sender's email password
16. Update
17 end
18 email. Send
Emails received:
PS: When "smtpserver" "smtpserverport" "smtpusessl" and other information are set incorrectly, the script will pop up an error dialog box to show that the email fails to be sent.