Sometimes it's really nice to email yourself status from a script that's busy doing something nefarious. For that I use the following tool:
http://www.daveswebsite.com/software/sendmail/You have to set up an XML file that contains the necessary information to send mail through your particular email server. Typically, if you use your ISP email address, this seems to work well. You're on your own if you want to use anything else. So create an XML file:
Edit: Annoying thing about having XML embedded into the code container below; doesn't work! So, change the "{" to "<"{Sendmail>
{Server host="smtp.XXXX.YYYY.net" port="25" username="" password=""/>
{Message>
{Sender email="myemail@server.net" name="EasyUO Daemon"/>
{Recipient email="mycellphone@att.com" name="YurName"/>
{Subject>Death Alert{/Subject>
{Body filename="z:\scripts\message.txt"/>
{/Message>
{/Sendmail>
The things you need to edit are:Server host="smtp.XXXX.YYYY.net"
Sender email="myemail@server.net"
Recipient email="mycellphone@att.com"
Body filename="z:\scripts\message.txt"
Make sure you edit this above information in the XML file to be compatible with your email/recipient/body.
This routine creates a message called "message.txt" that contains whatever mesage you want to send. Be sure that the filename matches the one that your above XML code is expecting.
sub SendDeathMail
set %messagefile z:\scripts\message.txt
execute cmd.exe /c echo > %messagefile
execute cmd.exe /c echo >> %messagefile %1
execute z:\scripts\sendmail.exe z:\scripts\deathmail.xml
return
Finally, you can call this to issue the email from your code:
set %text_string #CHARNAME, #spc , died
gosub SendDeathMail NULL %text_string
Hope that's helpful!
TM