Need help with a batch file, please!

In this forum you can share tips and tricks on how to use Cinemar products with some program or a task that you want it to do. So no one has to reinvent the wheel if you already did! (No questions in this forum only solutions, questions will be deleted without hesitation.)

THARTIGH
Expert
Expert
Posts: 878
Joined: Fri Apr 30, 2004 12:30 pm
Location: MI
Contact:

Need help with a batch file, please!

Postby THARTIGH » Fri Sep 29, 2006 5:18 am

Could someone with batch skills give me an example of how to send a basic email using outlook express?

email example:

To: todd@chickencentral.com
subject: Security Alert
Message: Security Alert! Glass break sensor was activated.

Thanks for any help!
___________
Todd

THARTIGH
Expert
Expert
Posts: 878
Joined: Fri Apr 30, 2004 12:30 pm
Location: MI
Contact:

Postby THARTIGH » Fri Sep 29, 2006 6:22 am

Looks like you need to use a command line utility to do this.

Like:
Blat - A Win32 command line SMTP mailer. Use it to automatically eMail logs, the contents of a html FORM, or whatever else you need to send.
http://www.blat.net/
___________

Todd

User avatar
hobie_od
Senior Member
Senior Member
Posts: 161
Joined: Tue Apr 26, 2005 11:50 am
Contact:

Postby hobie_od » Sun Oct 01, 2006 7:47 am

Here is a link from Micro$oft on how to do it with a script... http://www.microsoft.com/technet/script ... x?mfr=true

THARTIGH
Expert
Expert
Posts: 878
Joined: Fri Apr 30, 2004 12:30 pm
Location: MI
Contact:

Postby THARTIGH » Tue Oct 03, 2006 11:25 pm

Thank you! It work like a charm!

I opened notepad, pasted this:

Set objEmail = CreateObject("CDO.Message")

objEmail.From = "todd@chickencentral.com"
objEmail.To = "todd@chickencentral.com"
objEmail.Subject = "test security"
objEmail.Textbody = "testing the security worked"
objEmail.Send

then saved it as security email 1.vbs

This is now used to send a text message to my cell phone! It is received within a minute or so from running the script via mlserver. For verizon you can send an email to your cell number @vtext.com. (8001234567@vtext.com)

Thanks again!
___________

Todd

User avatar
hobie_od
Senior Member
Senior Member
Posts: 161
Joined: Tue Apr 26, 2005 11:50 am
Contact:

Postby hobie_od » Wed Oct 04, 2006 6:16 am

I was (still am) clueless about scripting, but after reading about what these geniuses here do wiht scripts I was intrigued to learn. I am too lazy to do the search now, but M$ has good info on scripting and a plethora of examples.

I was particularly interested in the scripts for interacting with databases.

8)


Return to “Tips, Tricks and Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest