Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [austin99] how to email all user's link to user: Edit Log

Here is the list of edits for this post
Re: [austin99] how to email all user's link to user
Thanks you Andy. you are right. Thanks for the corrction.


austin99 wrote:
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC Limit 3');
$sth = $search_db->select ( { isNew => 'Yes'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link', $link);
#$output .= GT::Template->parse( 'email-links.txt', { $IN->get_hash, %$CFG }, { compress => 0 } ); #replace it with above line if you have layout problem
}
my $TAGS;
$TAGS->{'output'} = $output;
Links::send_email("email-links.eml", { $IN->get_hash, %$USER, %$TAGS }) or die "Unable to send message: $GT::Mail::error";



email-links.eml

<%output%>



you then get a mail


link 1
link 2
link 3



share with others in case any one need it.

Last edited by:

austin99: Sep 30, 2009, 5:45 PM

Edit Log: