One of the issues we have at my web host is that webadmins get into trouble when AOL users abuse or misuse the Report As Spam button even though they subscribe to such things as forum notifications. So we ban aol addresses from subscribing to our forums. I figured it would be wise not to allow people to send my gallery ecards to aol addresses for the same reason. I modified my code, which you can see in action at my
gallery. If you don't have an aol address to test with, you can use the one that I tested with: testtoseeifscriptbansaoladdress2004-09-12@aol.com
2 files to edit:
lang/english.php (or other language file if you want)
ecard.php
In lang/english.php
FIND
if (defined('ECARDS_PHP') || defined('DISPLAYECARD_PHP')) $lang_ecard_php =array(
ADD
'aol_sucks' => ': AOL addresses not allowed due to abuse of spam reporting function and AOL\'s ridiculous policies.',
+++++++++++++++++++++++++++++
FIND
'rcpt_email' => 'Recipient email address',
REPLACE WITH
'rcpt_email' => 'Recipient email address <br>(aol addresses not allowed)',
+++++++++++++++++++++++++++++
in ecard.php
FIND
$recipient_email_warning = '';
ADD
$recipient_aol_warning = '';
+++++++++++++++++++++++++++++
FIND
$valid_email_pattern = "^[_\.0-9a-z\-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$";
$valid_sender_email = eregi($valid_email_pattern, $sender_email);
$valid_recipient_email = eregi($valid_email_pattern, $recipient_email);
$invalid_email = '<font size="1">' . $lang_ecard_php['invalid_email'] . '</font>';
if (!$valid_sender_email && count($HTTP_POST_VARS) > 0) $sender_email_warning = $invalid_email;
if (!$valid_recipient_email && count($HTTP_POST_VARS) > 0) $recipient_email_warning = $invalid_email;
REPLACE WITH
$valid_email_pattern = "^[_\.0-9a-z\-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$";
$valid_sender_email = eregi($valid_email_pattern, $sender_email);
$recipient_email_aol = eregi('aol.com', $recipient_email);
$valid_recipient_email = eregi($valid_email_pattern, $recipient_email) && !$recipient_email_aol;
$invalid_email = '<font size="1" color="red">' . $lang_ecard_php['invalid_email'] . ' (' . $recipient_email . ')</font>';
$aol_sucks = '<font size="1">' . $lang_ecard_php['aol_sucks'] . '</font>';
if (!$valid_sender_email && count($HTTP_POST_VARS) > 0) $sender_email_warning = $invalid_email;
if (!$valid_recipient_email && count($HTTP_POST_VARS) > 0) $recipient_email_warning = $invalid_email;
if ($recipient_email_aol && count($HTTP_POST_VARS) > 0) $recipient_aol_warning = $aol_sucks;
+++++++++++++++++++++++++++++
FIND
<td valign="top" class="tableb" width="60%">
<input type="text" class="textinput" name="recipient_email" value="$recipient_email" style="WIDTH: 100%;"><br />
$recipient_email_warning
</td>
REPLACE WITH
<td valign="top" class="tableb" width="60%">
<input type="text" class="textinput" name="recipient_email" value="$recipient_email" style="WIDTH: 100%;"><br />
$recipient_email_warning $recipient_aol_warning
</td>
This code likely could be modified so it's configurable to be disabled/enabled with any domain that the admin wants. However, that would take time and effort that might not be worth for me to figure out if the demand for this feature isn't high enough.