View Full Version : Windows Email Notifier?
Velusion
January 2nd, 2007, 09:19 PM
Does anyone have a program or script that would auto notify via email people that they can play their turn in a multi TCP/IP game? It needs to be for Windows...
Gandalf Parker
January 2nd, 2007, 10:30 PM
It gets rough in windows. But the googler keywords you want are "command line" windows client
You might check out these.. googling (http://www.google.com/search?complete=1&hl=en&q="command+line"+email+windows&btnG=Google+Search)
NickW
January 2nd, 2007, 10:37 PM
For Linux servers, I use this script as my --postexec for email notifications
Code:
#!/bin/bash
PLAYER1=someguy@someemail.com
PLAYER2=someguy@someemail.com
PLAYER3=someguy@someemail.com
PLAYER4=someguy@someemail.com
PLAYER5=someguy@someemail.com
PLAYER6=someguy@someemail.com
PLAYER7=someguy@someemail.com
PLAYER8=someguy@someemail.com
sendmail -fme@my.isp.com -FDomserver $PLAYER1 $PLAYER2 $PLAYER3 $PLAYER4 $PLAYER5 $PLAYER7 $PLAYER8 <<EOF
From: Nick's Dom3 Server <me@my.isp.com>
Subject: Game has hosted
Please connect to server XXXX port YYYY to play your next turn
.
EOF
For windows servers, I install windows scripting host and then use this vbs script
Code:
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "yourusername@yourdomain.com"
objEmail.To = "player1@somedomain.com;player2@somedomain.com"
objEmail.Subject = "Game XXX has hosted!"
objEmail.Textbody = "Please connect to server XXXX port YYYY to play your next turn!"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpserver.yourdomain.com"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'These lines are for if your ISP's SMTP server required authentication
'They can be commented out if not needed
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "yourusername"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpassword"
objEmail.Configuration.Fields.Update
objEmail.Send
Velusion
January 2nd, 2007, 10:41 PM
Thanks Nick!
How do you call that VBS script? (i.e. how does it know to activate when the turn is ready?)
NickW
January 2nd, 2007, 10:47 PM
With the --postexec argument to dom3. You just whip up a custom shortcut to start your dom3 server. You probably want to use things like --textonly --tcpserver --port and so forth anyway, so just add another arg.
Velusion
January 2nd, 2007, 10:48 PM
Ahhh cool. I'll give it a go. Thanks!
alexti
January 3rd, 2007, 12:44 AM
You can install cygwin on Windows and use Linux scripts.
NickW
January 3rd, 2007, 12:53 AM
alexti said:
You can install cygwin on Windows and use Linux scripts.
Bit of overkill though, for someone who just wants simple email notifications for their dom3 game.
alexti
January 4th, 2007, 02:29 AM
It's useful for all kind of things that are otherwise very difficult on Windows. But considering that it's essentially a large set of many convenient utilities, it's hard for most people to find a "must install" reason for cygwin http://forum.shrapnelgames.com/images/smilies/happy.gif
Velusion
January 4th, 2007, 11:40 PM
Thanks Nick.... used your script and it seems to be working great!
NickW
January 5th, 2007, 11:38 AM
Velusion said:
Thanks Nick.... used your script and it seems to be working great!
Glad I could help out. I wrote that script because I simply cannot stand to play in a game without email notifications. I'm simply too scatterbrained and can't manage to remember to check every day for new turns without some sort of prompting. Necessity truly is the mother of invention.
Jack_Trowell
January 5th, 2007, 12:20 PM
If it happens to be really needed, I could do a perl script.
By using the correct modules, I could have the same script work bith with widows and Unix with almost no changes, and maybe an external file (XML ?) to setup the whole (list of email addresses + server settings.
Perl (and the needed modules) would be easier (and faster) to install that cygwin, but I wonder if there's really a need for such a script ? (as I'm under the impression that a lot of scripts like that have already been done)
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.