Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Email link owner - reviewed added (again ;): Edit Log

Here is the list of edits for this post
Email link owner - reviewed added (again ;)
Hi,

Im interested in setting up a auto email feature when a review is added.

here's what i've got so far im my Review.pm - (basically duplicating the mail admin if a review has been posted for validation)

Code:
#Email link owner
if ($CFG->{email_review_comment}) { # Field added to Links Table (Yes, No - 1,0) If the link owner has requested to be kept up to date on reviews
my $to = $CFG->{Contact_Email};
my $from = $CFG->{db_admin_email};
my $subject = "Review posted on your site ". $CFG->{title};
my $cfg = Links::Config::load_vars();
my $msg = GT::Template->parse ( 'review-email-val.txt', { %$input, %$cfg, %$rec}, { compress => 0, root => $CFG->{admin_root_path} . '/templates/admin' } );
require GT::Mail;
$GT::Mail::error ||= ''; # Silence -w
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
from => $from,
subject => $subject,
to => $to,
msg => $msg,
debug => $Links::DEBUG
) or die "Unable to send mail: $GT::Mail::error";
}


Im struggling to figure how to query the Links table for the Contact_Email and Title values (also the custom column i've added email_review_comment) from within Review.pm - is this possable?



thanks for your help,



Charlie

Edit: I see someone's posted a method for doing this here: http://gossamer-threads.com/perl/gforum/gforum.cgi?post=196993 which seems to be using $input->{Contact_Email}"; # I take it this is using a hidden field within the post review form - if so the posters leaving a route for spam bots to harass there users :(



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Last edited by:

Chas-a: Sep 8, 2003, 11:32 AM

Edit Log: