Page 1 of 1

Welcome email for new FEU users

Posted: Thu May 13, 2010 5:42 pm
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.

Re: Welcome email for new FEU users

Posted: Thu May 13, 2010 6:30 pm
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?

Re: Welcome email for new FEU users

Posted: Mon May 17, 2010 8:36 pm
by dmgd