Gossamer Forum
Home : Products : Gossamer Links : Discussions :

xtra admin link added emails (Glinks 3)

Quote Reply
xtra admin link added emails (Glinks 3)
I need to send admin notification of links added emails to 3 different people (3 unchanging email addresses)- how can I do this in GLinks 3.x?

Thanks in advance.
Quote Reply
Re: [Alba] xtra admin link added emails (Glinks 3) In reply to
Hi,

You could give my SendEmailAfterAdd plugin a go. Just change (in SendEmailAfterAdd.pm);

Code:
my $support_email = $CFG->{db_admin_email};

...to;

Code:
my $support_email = 'person@domain.com';
my $support_email2 = 'person2@domain.com';
my $support_email3 = 'person3@domain.com';

..and then change;

Code:
require GT::Mail;
$GT::Mail::error ||= ''; # Silence -w
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
from => $support_email,
subject => $subject,
to => $IN->param('Contact_Email'),
msg => $message,
debug => $Links::DEBUG
) or Links::fatal ("Unable to send mail: $GT::Mail::error");

..to;

Code:
require GT::Mail;
$GT::Mail::error ||= ''; # Silence -w
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
from => $support_email,
subject => $subject,
to => $support_email,
bcc => "$support_email2,$support_email3",
msg => $message,
debug => $Links::DEBUG
) or Links::fatal ("Unable to send mail: $GT::Mail::error");

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] xtra admin link added emails (Glinks 3) In reply to
Thanks Andy,

Hadn't noticed this plugin before.
Quote Reply
Re: [Alba] xtra admin link added emails (Glinks 3) In reply to
Or just edit the e-mail itself from the e-mail editor interface. You don't want to change send_email() unless you want EVERY e-mail to be sent to those users.

Adrian
Quote Reply
Re: [brewt] xtra admin link added emails (Glinks 3) In reply to
Thanks, that looks sensible, I can use payment_received.eml because it only needs to go to the others if it is a paid listing.

If I add BCC: email1, email2 in the extra headers box will this work or does it need extra coding?

Thanks again
Quote Reply
Re: [Alba] xtra admin link added emails (Glinks 3) In reply to
Nope, that will do it.

Adrian