Created the send_mail() function, which generates and sends a forgotten password from the site.
How to configure the mail from which the password will be sent to the user?
send_mail('почта которую нужно настроить', $email, 'Новый пароль для сайта blabla.ru', 'Ваш пароль: ' . $newpass);
send_mail('no-reply@blabla.ru', $email, 'Новый пароль для сайта blabla.ru', 'Ваш пароль: ' . $newpass);- Valijon Rahimovfunction send_mail($from,$to,$subject,$body) { $charset = 'utf-8'; mb_language("ru"); $headers = "MIME Version: 1.0 \n"; $headers = "From: <".$from."> \n"; $headers = "Reply-To: <".$to." \n>"; $headers = "Content-Type: text/html; charset=$charset \n"; $subject = '=?'.$charset.'?B'.base64_encode($subject).'?='; mail($to,$subject,$body,$headers); }function send_mail($from,$to,$subject,$body) { $charset = 'utf-8'; mb_language("ru"); $headers = "MIME Version: 1.0 \n"; $headers = "From: <".$from."> \n"; $headers = "Reply-To: <".$to." \n>"; $headers = "Content-Type: text/html; charset=$charset \n"; $subject = '=?'.$charset.'?B'.base64_encode($subject).'?='; mail($to,$subject,$body,$headers); }function send_mail($from,$to,$subject,$body) { $charset = 'utf-8'; mb_language("ru"); $headers = "MIME Version: 1.0 \n"; $headers = "From: <".$from."> \n"; $headers = "Reply-To: <".$to." \n>"; $headers = "Content-Type: text/html; charset=$charset \n"; $subject = '=?'.$charset.'?B'.base64_encode($subject).'?='; mail($to,$subject,$body,$headers); }- Valijon Rahimov