|Alright, I found my VBS email example. You'll have to fill out the relevant values yourself. |
Also, you'll need a third party application to compress the files. I recommend 7-Zip, because it's free and command-line based. I think one of the Windows zipping applications has scriptable ActiveX/COM components, but I don't have them, and I don't know if you have them.
Also, some versions of Office interfere with the native CDO.Message. If that's the case, I can show you how to wrap it up in a .WSH file to use the "correct" CDO.Message, but then you'd have to explicitly call wscript/cscript to run the script.
Const attachName = "something.doc"
timeout = 15 / (24 * 60) '15 minutes
Const emailTo = "firstname.lastname@example.org"
Const emailFrom = "email@example.com"
Const emailSbjct = "Some subject"
Const SMTPServer = "smtp.your.email.com"
Const SMTPPort = 25
Const emailUsr = "firstname.lastname@example.org"
Const emailPsswd = "YourPassword"
Const emailSSL = False
emailMsg = "Some generic message, like 'ur filez, lol'"
Const cfg = "http://schemas.microsoft.com/cdo/configuration/"
.From = emailFrom
.To = emailTo
.Subject = emailSbjct
.TextBody = emailMsg
.Item(cfg & "sendusing") = 2
.Item(cfg & "smtpserver") = SMTPServer
.Item(cfg & "smtpserverport") = SMTPPort
.Item(cfg & "smtpconnectiontimeout") = 60
.Item(cfg & "smtpauthenticate") = 1
.Item(cfg & "smtpusessl") = emailSSL
.Item(cfg & "sendusername") = emailUsr
.Item(cfg & "sendpassword") = emailPsswd