Miscellaneous ⇒ User & Newbie Resources :: Archives ⇒ Having problems getting mails from the error.php file? :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexUser & Newbie Resources

Archived ⇒ Having problems getting mails from the error.php file?


I just had this problem so I thought I'd share my solution.

If you don't get any mails even though you have
$email = true;
in your error.php you might have the same problem I had, i.e. e-mails were sent to webmaster @ www.domain.tld, instead of webmaster @ domain.tld.

The solution is to either directly enter the e-mail address like this:

$notify = 'webmaster@domain.tld';

or, to let php remove the leading 'www.' part of the name, like this:

$domain = ereg_replace( '^www\.', '', $_SERVER['HTTP_HOST'] ); $notify = 'webmaster@'.$domain; $notifyfrom = 'noreply@'.$domain;

Perhaps this is something that should be made standard? Or are there people using e-mail addresses like you @ www.domain.tld ?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>


i found sent email from error log is bad idea, you get Thousand of mail .

just my 2 cents.

Firefox is my Favorite Browser

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Apache/1.3.34 (Unix)/4.0.25-standard/4.4.1/CVS


Yes, but there are occations when you want to see the errors....just thought it should work at least Smile

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>

All times are UTC