I am a bit stuck. I wrote code for a members login page and after they register I want them to be able to get an email with their login info.
Problem is I do not know how to set the mail function to use the dreamhost smtp settings. here is my code any help on where or how to set the smtp up would be appreciated.
$to = ‘$memEmail’;
$subject = ‘Your Membership’;
$message = 'Dear $memFirstName $memSurName,
You are now registered at our website, http://www.nerodb.com !
To access your membership and character sheets, you will be able to login with the following information:
Please keep this username and password in a location that is easily accessible by you.
This is an automated response, please do not reply!’;
$headers = “From: firstname.lastname@example.org\r\n” .
‘X-Mailer: PHP/’ . phpversion() . “\r\n” .
“MIME-Version: 1.0\r\n” .
“Content-Type: text/html; charset=utf-8\r\n” .
mail($to, $subject, $message, $headers)or die(‘something went wrong’);