please refer the following code.in there am sending username and password.email has sent to the gmail.but it is in spam folder.it happens only in gmail.
Here is my code
$to = $email;
$subject = ' Web Site| login Details'; // Give the email a subject
$message = '
Thanks for signing up!
Your account has been created, you can login with the following credentials.
------------------------
Username: '.$uname.'
Password: '.$upass.'
Web Builder login: '.$ulink.'
------------------------ ';
$headers .= 'From:noreply@ggg.eee.net' . "\r\n";
$headers .= 'Bcc: kae@ggg.eee.net' ."\r\n";
$headers .= 'Bcc: thi@ggg.eee.net' ."\r\n";
mail($to, $subject, $message, $headers);