We have a policy in our company where our call center agents must have email, but it is not a publicly available email address. As a result, we have an @domain.local email suffix for those users so all of our corporate users can still communicate internally with one another.
However, timetrex will not let me add @domain.local as a valid email address. I'm guessing the software is looking for a .COM, .NET etc. I can certainly understand if this is a by design to help users from entering invalid email addresses, but I'd love to see a server-side preference to turn off email domain checking.
Perhaps there is a file I can edit and add .LOCAL to the domains it checks?
TimeTrex to allow non-standard email domain names.
Re: TimeTrex to allow non-standard email domain names.
You can modify classes/modules/core/Validator.class.php, around line 350 you will see:
Change the preg_match line {2,4} to {2,5}, like this:
If you are using TimeTrex v3.0 or above you will also need to change your mail options to use a local SMTP server as well, you can do this by adding the following block to the timetrex.ini.php file:
If you are using Linux or have a local SMTP server setup that automatically handles mail, you could try using this instead:
Code: Select all
function isEmail($label, $value, $msg = NULL) {
//Debug::text('Raw Email: '. $value, __FILE__, __LINE__, __METHOD__, $this->verbosity);
if ( preg_match('/^[\w\.\-\&]+\@[\w\.\-]+\.[a-z]{2,4}$/i',$value) ) {
return TRUE;
}
$this->Error($label, $msg);
return FALSE;
}
Code: Select all
function isEmail($label, $value, $msg = NULL) {
//Debug::text('Raw Email: '. $value, __FILE__, __LINE__, __METHOD__, $this->verbosity);
if ( preg_match('/^[\w\.\-\&]+\@[\w\.\-]+\.[a-z]{2,5}$/i',$value) ) {
return TRUE;
}
$this->Error($label, $msg);
return FALSE;
}
Code: Select all
[mail]
delivery_method = smtp
smtp_host=smtp.gmail.com
smtp_port=587
smtp_username=john.doe@gmail.com
smtp_password=mypass
Code: Select all
[mail]
delivery_method = mail