Generate random passwords and send email to userYou can use this feature in the forgotPassword scenarios
I have used random passwords in a scenario where a user forgets his password and receives a temporary new password.
Generate random password -rand() $random=rand(1234,2343);
$password="mypass".$random;
Send email to user - mail()$headers ="From: [email protected]\n"; //from address
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \n";
$subject ="Password Recovery - Do Not Reply Back To This Email";
$body="<div align=center><br><br>----------------------------- Password Recovery--------------------------------<br><br><br><br>Your Temporary Password is: $password<br><br>Remember your password this time!</div>";
if(mail($pemail,$subject,$body,$headers))
{
echo "<font class=tblackb>Your password has been send to $pemail</font>";
}
else
{
echo "<font class=tblackb>Password Not Send.<br><Br>Please Try Again Later!...</font>";
}
Save as sendpassword.php
Upload on the web and test it