0

When a user creates an account he automaticcly gets an email with his username and password.

$msg = "Hello '$username'\nLogin Data:\n\nUsername: '$username'\nPassword: '$password'\n\nThank you for registering here!";
// Send mail
$to = $email;
$subject = "Welcome";
$headers = "From:[email protected]\r\n";
mail($to, $subject, $msg, $headers);
header("refresh:5;url=../index.html");
echo 'Registration successful. You\'ll be redirected in about 5 seconds. If not, click <a href="../index.html">here</a>.';

php.ini

 SMTP = smtp.gmail.com
 smtp_port = 25
 sendmail_from = [email protected]
 sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
 sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"

sendmail.ini

smtp_server=smtp.gmail.com
smtp_port=25
error_logfile=error.log
debug_logfile=debug.log
[email protected]
auth_password=pass
[email protected]

Did I do something wrong ? :)

Andrei Olar
  • 2,270
  • 1
  • 15
  • 34

0 Answers0