Email username and password after creating a new user
Posted: Tue Sep 27, 2016 6:03 pm
If you want to email USER/PASS after creating a new user, then you can modify the file "webadmin/admin_adduser.html", find this line: AddUser(domain,user)
And insert the following line below it:
if user.note_email ~= "" then
c_SendMail(user.note_email,"Your account name and password","Your account name and password<br>Username: "..user.username.."<br>Password: "..user.password,"","SMTP_CONFIG")
end
Here, user.note_email is the email address defined at "User -> Notes -> Email address", SMTP_CONFIG is the SMTP configuration name, you can add a SMTP configuration at "Server > Settings > SMTP Manager".
And if you want to force user changing his password, just check on this option "Domain > Settings > General Settings > Password & Security > Need to change the password on the first logon".
And insert the following line below it:
if user.note_email ~= "" then
c_SendMail(user.note_email,"Your account name and password","Your account name and password<br>Username: "..user.username.."<br>Password: "..user.password,"","SMTP_CONFIG")
end
Here, user.note_email is the email address defined at "User -> Notes -> Email address", SMTP_CONFIG is the SMTP configuration name, you can add a SMTP configuration at "Server > Settings > SMTP Manager".
And if you want to force user changing his password, just check on this option "Domain > Settings > General Settings > Password & Security > Need to change the password on the first logon".