I know that e-mail support is something that's probably best done through a plugin, and I toyed around with the problem a bit before realizing that I absolutely suck at C++.
There was a solution, though I'll be the first to admit it wasn't the best way of doing things... building on HaCK's excellent mob-checker with e-mail support, I made a simple lil' program that will read settings from an *.ini file and e-mail 'em. This allows you to set custom e-mail messages on the fly.
EQMail.inc
Code: Select all
| EQMail.inc
Sub EQMail
/if @Param0=="" {
/echo Usage: /call eqmail <from> <e-mail address> <subject> <message>
} else {
/ini "eqmail.ini" "Main" "FromName" "@Param0"
/ini "eqmail.ini" "Main" "ToEmailAddress" "@Param1"
/ini "eqmail.ini" "Main" "EmailSubject" "@Param2"
/ini "eqmail.ini" "Main" "EmailBodyOfMessage" "@Param3"
/exec "$ini(eqmail.ini,Main,AppPath)" bg
}
/return
Code: Select all
[Main]
AppPath=C:\Macros\EQMail.exe
MailServerName=mx1.hotmail.com
FromName=Spawn Checker
FromEmailAddress=spawn@macroquest2.com
ToName=me@wherever.com
ToEmailAddress=me@wherever.com
EmailSubject=Blah has spawned.
EmailBodyOfMessage=Skip off work and come kill me.
Here's a bit of sample code, using eqmail.inc.
Code: Select all
#include eqmail.inc
Sub Main
/declare alertlistno_ global
/declare spawn_name global
/varset alertlistno_ 9
/varset spawn_name "@Param0"
/alert clear alertlistno_
/alert add alertlistno_ npc radius 10000 "@spawn_name"
:TOP
/if $alert(alertlistno_)==TRUE {
/call EQMail "@spawn_name" "youremail@wherever.com" "I've spawned!" "Come kill me."
/return
} else {
/goto :TOP
}
/return
A quick note: if you wanted more functionality, you could use the /ini command to change the other settings in the *.ini file, such as the SMTP server, the e-mail address from which the e-mail would appear to originate, the name the e-mail was being sent to, etc. All of these values are reloaded whenever EQMail.exe is executed.

