Posts

Showing posts from November, 2006

Sending CDO Email via VBS with embedded attachments

Recently it was asked in another NG post: I have an asp (classic) page from which I send mails to some users. I select those users from a recordset and depending upon certain condition, the messsages are sent. Well, if I load this asp file, all the stuff works fine: the recordset, the mails sent to the correct users (using CDOSYS in Win2003), so now they can receive and read the messages without a single problem. Now I need something like a demon implemented in a .vbs script. With a bat file running every hour, i need the same functionalities: connect and build the recordset, and sending the mails to the users in an automated way, every hour. But I just don't know if it's possible to do such a task. somebody has an example of how could you send a mail from a vbs file that works within the task manager? I don't ask for the task manager obviously, but for the way sending mails are implemented in an automated .vbs. I suppose it's not enough to paste part the same code (for

Recurring AT scheduling using VBS and batch files.

Heres the text of a post I was involved in over at m.p.scripting.vbscript. It relates to the process by which you can create a scheduled task that repeats itself more than one time per day on a regular schedule... ok, now we have three files.... To use this place all three files in the same location. Call login.vbs in your login script instead of the .bat make sure you delete this temp file before retrying this procedure... ( or when you have to re-create the task using login.vbs ) c:\>del %temp%\Done.yet Send your cashier check to : (just kidding) D. login.vbs Const Hide = 0 : Dim VBS, ACT, path Function GetPath()   path = WScript.ScriptFullName   GetPath = Left (path, InstrRev (path, "\" )) End Function Set Act = CreateObject ( "Wscript.Shell" ) VBS = trim (GetPath) & "\new4.bat """ & trim (GetPath) & "\"" CHECKME" Act.Run(VBS),Hide, True normal.vbs Const Hide = 0 : Dim VBS,