If you've multiple server to manage each with their individual plugins, you're quickly raging about the amount of logs directorys you have to check to notice one plugin erroring.
Now you're able to lay back and wait for the error to occur! This plugin will send you an E-Mail with the newest error log on each map change, if there's been any errors since the last E-Mail.
You're able to specify multiple recipients, if you need more people informed.
Version 1 is based off Timiditas'
SMTP protocol implementation. Huge thanks for putting the steps together
Version 2 uses
cURL to send the E-Mail and thus
supports STARTTLS and SSL/TLS encryption.
Error Mail 2 was rewritten and is not sending mails for closed error log file sessions anymore. It sends the full contents of the error files now instead of truncating them due to buffer limitations in SP.
Requirements:
Convars:
- sm_errormail_version - ...
- sm_errormail_host - SMTP server hostname/IP (without http://!)
- sm_errormail_port - SMTP server port (Default: 25)
- sm_errormail_user - SMTP username to login as
- sm_errormail_pass - SMTP user password
- sm_errormail_from - E-Mail address to send mails from
- sm_errormail_to - E-Mail address(es) to send error logs to. Seperate multiple ones with a ; Whitespace is ignored.
NEW IN VERSION 2.0:
- sm_errormail_secure - Set to 0 for no encryption, 1 for STARTTLS and 2 for SSL/TLS (Default 0)
- sm_errormail_verifyhost - If encryption is enabled, verify that the host in the certificate is the one you connect to? (Default 1)
- sm_errormail_verifypeer - If encryption is enabled, verify the host's certificate? (Default 1)
- sm_errormail_verbose - Verbosity of curl communication logging. For debugging. (Default 0)
Configure those convars in the generated plugin.smerrormail.cfg in your cfg/sourcemod folder after the plugin has been first loaded.
It's likely that every email server host is working, so you're able to send mails from your gmail account or similar. Check for email client configuration information and enter them in the cfg.
The mail is plain text and contains the hostname, ip:port and error logfile name and content. It uses a small file to memorize when it last sent an email and at which line it stopped sending in the last file (sourcemod/data/error_mail_state.data), so don't delete it by accident or you may miss some logs!
If you want to compile Version 1.0 yourself, you need to have the
Base64 and
Socket include files available. Version 2.0 requires the
cURL include.
Use
smerrormail.smx if you don't want to run the cURL extension and use a mail server that accepts plain text authentication.
Use
smerrormail2.smx if your mail server requires secure authentication (or you just care about your credentials)