Welcome email for new FEU users

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
aivarukas
New Member
New Member
Posts: 6
Joined: Mon Nov 30, 2009 9:25 pm

Welcome email for new FEU users

Post by aivarukas »

Hello,

Ive been trying to make an UDT and fetch it to SelfRegistration OnUserRegistered event, so after the completion of registration , new users receive a welcome email.

Code: Select all

global $gCms;
$config = $gCms->GetConfig();
$site = $config['root_url'];
$feusers = $gCms->modules['FrontEndUsers']['object'];


$username = $feusers->GetEmail($uid);


$to      = $username;
$from 	 = 'webmaster@mysite.org';
$subject = 'Your account information';
$message = <<<EOT
You have been added as a new user at Mysite.Org.

This is your account information:

Your username is: $username

Log into the site here: $site 
EOT;

echo "<p>E-mailing user account information…";
if(@mail($to, $subject, $message)) {
	echo '[done]';
} else {
	echo '<strong>[failed]</strong>';
}
echo "</p>";
Whats wrong with it?

P.S I use email as a username.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Welcome email for new FEU users

Post by jmcgin51 »

Why do you ask "what's wrong with it?"?  Is anything wrong with it?  Does it work?  If not, what happens?  What errors?
dmgd
Forum Members
Forum Members
Posts: 115
Joined: Tue Jun 06, 2006 1:10 pm

Re: Welcome email for new FEU users

Post by dmgd »

Mark
Post Reply

Return to “Modules/Add-Ons”