Hello,
I would like to receive an email for each registering of a new member.
I created an email box especially for that. I made some tests of registering but i don't receive anything in the mail box created for that.
I put this email address in the notification field in admin panel (and the email address is the good one, no error in the address).
Did I forgot something ?
If it is possible to do it, in which file the email is configured ?
Thanks
OSSN User
To do it the fast and dirty way - simply use the register action itself.
You got all necessary user data already here in place,
you only need to build up a reasonable email body,
then get yourself an instance of the OssnMail
class
and use the NotifiyUser
function to send that mail to the Owner Email
address.
That's it.
And if it's working out the way you want, and if you want it to do the recommended way and leave the core untouched, then copy that changed action into an own component, register it, and revert the core file back to the original.
How do to it myself.
I know how to do a send of mail with php but when i declare my own variable (with the 'simple' mail() function) but i didn't found where and how the variables are declared.
The variables are these lines ? (found in actions/user/register.php)
$add->username = $user['username'];
$add->firstname = $user['firstname'];
$add->lastname = $user['lastname'];
$add->email = $user['email'];
$add->password = $user['password'];
if i want to make my own mail() function, how must i declare it ?
<?php
(mail([email protected])){
echo 'A new user subscribed on your website.<br />';
echo 'His pseudo is ' . $user['username'] . '<br /><br />';
echo 'His email is ' . $user['email'] . '<br /><br />';
} else {
echo "Error";
}
?>
> I put this email address in the notification field in admin panel
Hm, it sounds like you got it wrong. The Site Notification Email
is not a target, it's source address.
When I register to your community, I will receive a mail from the address you entered there. Not you.
What you want, is an additional email with the credentials of the new user being sent to the Owner Email
address. But that's currently not implemented I think.
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)