Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Email after signup

Quote Reply
Email after signup
hello, how to send an email to admin, include the values name and Email, when a user signup

thanks hoefti
linktobuy Web Directory
Ratgeber Recht
Quote Reply
Re: [hoefti] Email after signup In reply to
Hi,

Sorry about the late reply.

You should create PRE plugin for 'signup' hook which looks like:

sub signup {
my ($home) = @_;

GT::Plugins->action(STOP);
my ($tpl, $args) = $home->signup();

require GT::Mail;
# Create and Sending
my $msg = "MESSAGE BODY HERE"
my $to = $CFG->{admin_email};
my $from = "FROM EMAIL";
my $sbj = "MESSAGE SUBJECT";

GT::Mail->send (
'Content-type' => 'text/html',
sendmail => $CFG->{db_mail_path},
to => $to,
from => $from,
subject => $sbj,
msg => $msg
) or die "Error: $GT::Mail::error";
return ($tpl, $args);
}

Hope that helps.

TheStone.

B.