I'm new to vbscript and need help sending an attachment by date via email. Im not using outlook and can already send an email with an attachment. I use the code below to send the attachment.
message.addattachment "d:\program files\reports\test.txt"
.From = "mike@domain.com"
However, the filename will change each day and I need to send the email each day. So, I guess I need to be able to attach a file based on date. So, if there is a new file in the directory today I would attach that file. Not sure how to do this though.
message.addattachment "d:\program files\reports\test.txt"
.From = "mike@domain.com"
However, the filename will change each day and I need to send the email each day. So, I guess I need to be able to attach a file based on date. So, if there is a new file in the directory today I would attach that file. Not sure how to do this though.