- Comment updates for DataPath, MapDefinitions and Email.

- Added a FromAddress to Email for MailMessage construction, using "RunUO" as done before throws an exception because it's not an email address.
- Fixed the regular expression in Email to check for valid email addresses.
This commit is contained in:
eos 2012-04-29 20:12:24 +00:00
parent 31185a874f
commit fd6d28d56b
5 changed files with 17 additions and 14 deletions

View file

@ -8,25 +8,27 @@ namespace Server.Misc
{
public class Email
{
/* In order to support emailing, fill in EmailServer:
/* In order to support emailing, fill in EmailServer and FromAddress:
* Example:
* public static readonly string EmailServer = "mail.domain.com";
* public static readonly string FromAddress = "runuo@domain.com";
*
* If you want to add crash reporting emailing, fill in CrashAddresses:
* Example:
* public static readonly string CrashAddresses = "first@email.here;second@email.here;third@email.here";
* public static readonly string CrashAddresses = "first@email.here,second@email.here,third@email.here";
*
* If you want to add speech log page emailing, fill in SpeechLogPageAddresses:
* Example:
* public static readonly string SpeechLogPageAddresses = "first@email.here;second@email.here;third@email.here";
* public static readonly string SpeechLogPageAddresses = "first@email.here,second@email.here,third@email.here";
*/
public static readonly string EmailServer = null;
public static readonly string FromAddress = null;
public static readonly string CrashAddresses = null;
public static readonly string SpeechLogPageAddresses = null;
private static Regex _pattern = new Regex( @"^[a-z0-9.+_-]+@([a-z0-9-]+.)+[a-z]+$", RegexOptions.IgnoreCase );
private static Regex _pattern = new Regex( @"^[a-z0-9.+_-]+@([a-z0-9-]+\.)+[a-z]+$", RegexOptions.Compiled | RegexOptions.IgnoreCase );
public static bool IsValid( string address )
{