Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Email link owner - reviewed added (again ;)

Quote Reply
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
Subject Author Views Date
Thread Email link owner - reviewed added (again ;) Chas-a 2057 Sep 8, 2003, 11:26 AM
Thread Re: [Chas-a] Email link owner - reviewed added (again ;)
Andy 1978 Sep 8, 2003, 12:02 PM
Thread Re: [Andy] Email link owner - reviewed added (again ;)
Chas-a 1977 Sep 8, 2003, 1:48 PM
Post Re: [Chas-a] Email link owner - reviewed added (again ;)
Andy 1968 Sep 8, 2003, 1:55 PM
Thread Re: [Chas-a] Email link owner - reviewed added (again ;)
afinlr 1956 Sep 9, 2003, 4:30 AM
Post Re: [afinlr] Email link owner - reviewed added (again ;)
Chas-a 1949 Sep 9, 2003, 4:53 AM