Gossamer Forum
Home : Products : Links 2.0 : Customization :

Email when Deleting; please help me check code

Quote Reply
Email when Deleting; please help me check code
I am attempting to modify Links so that it will send an email to the user if their link has been deleted. The body of the email will contain various reasons as to why it may have been rejected (porn, warez, invalid url, double email addy submitted, etc.) and it's important to us. Smile

The only things I can find referring to email whatsoever are in links.cfg and admin_html.pl. Am I missing something somewhere?

In links.cfg I added these two fields under Email Notifications:
#Email address to send "deleted link unfairly" letters:
$db_unfair_email = 'unfair@grand-central-chat.net';

and

# Notify visitors automatically when their links are deleted?
$db_email_delete = 1;

In admin_html.pl, under Email Messages, I copied the sub html_validate_email and changed it to apply to deletion, then pasted my changed version after sub html_modify_email. It looks like this:

sub html_delete_email {
# --------------------------------------------------------
# All the link information is stored in %link.
my (%link) = @_;

open (MAIL, "|$db_mail_path") or &cgierr ("unable to open mail: $db_mail_path. Reason: $!");
print MAIL "To: $link{'Contact Name'} <$link{'Contact Email'}>\n";
print MAIL "From: $db_admin_email\n";
print MAIL "Subject: We're sorry, your link has been deleted.\n\n";
print MAIL qq|
Your submission to the Grand Central Search Engine was not accepted, or has been deleted after further
review. The most common reasons for non-acceptance are:

1. Broken link or invalid address.Please check the URL of the submitted site below.
2. No description given for the site.Please enter a description for your submission as the search engine
uses the description to locate sites when a user submits keywords.
3. The content of the submitted site was not appropriate for the GC Search Engine. We do not accept
submissions from porn sites, sites that show nudity (including personal webcams), warez, or sites that
are generally unnaceptable for an all-ages audience. For more information, please read our FAQ
located at:
http://www.grand-central-chat.net/search/faq.html
4. Double email submission (two emails being submitted, causing an error in the database).


Please review your submission to make sure there are no errors that may have caused your submission
to be deleted:

Title: $link{'Title'}
URL: $link{'URL'}
Category: $link{'Category'}
Description: $link{'Description'}
Contact Name: $link{'Contact Name'}
Contact Email: $link{'Contact Email'}

If you find errors, please re-submit the corrected link at our search engine:

http://www.grand-central-chat.net/search

If there were no errors and you have questions as to why your link was deleted, please
contact us with the URL you were trying to submit at the following address:

$db_unfair_email

Should you have any questions, please don't hesitate to ask!

Sincerely,

Raven, webmaster\@grand-central-chat.net
Briteangl, grand central search engine goddess
|;
close MAIL;
}

Is that all I have to do? I feel that I am missing something somewhere, I cannot find in the scripts where the script tells itself to run the html_validate_email or html_modify_email subroutines; and I am horribly worried that I missed something huge. Smile

If this is all I need to do, please tell me! If I missed something, tear me apart!

Thanks in advance,
Raven
Subject Author Views Date
Thread Email when Deleting; please help me check code Raven 989 Feb 26, 1999, 9:53 AM
Thread Re: Email when Deleting; please help me check code
Alex 970 Feb 25, 1999, 9:20 PM
Post Re: [Alex] Email when Deleting; please help me check code
Vs_Greg 946 Nov 22, 2001, 1:01 PM
Post Re: Email when Deleting; please help me check code
Raven 973 Feb 26, 1999, 9:54 AM