.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Windows Email Notifier? (http://forum.shrapnelgames.com/showthread.php?t=32621)

Velusion January 2nd, 2007 09:19 PM

Windows Email Notifier?
 
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

Re: Windows Email Notifier?
 
It gets rough in windows. But the googler keywords you want are "command line" windows client

You might check out these.. googling

NickW January 2nd, 2007 10:37 PM

Re: Windows Email Notifier?
 
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

Re: Windows Email Notifier?
 
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

Re: Windows Email Notifier?
 
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

Re: Windows Email Notifier?
 
Ahhh cool. I'll give it a go. Thanks!

alexti January 3rd, 2007 12:44 AM

Re: Windows Email Notifier?
 
You can install cygwin on Windows and use Linux scripts.

NickW January 3rd, 2007 12:53 AM

Re: Windows Email Notifier?
 
Quote:

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

Re: Windows Email Notifier?
 
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

Re: Windows Email Notifier?
 
Thanks Nick.... used your script and it seems to be working great!


All times are GMT -4. The time now is 10:14 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.