Reputation: 44066
I have this logic
$subject = "something.com Signup -
Please do not reply to this email. It was automatically generated.";
$body = "A new person has signed up to receive something updates:";
$headers = "From: [email protected]\n";
$headers .= "Reply-To: [email protected]\n";
// $headers .= 'Bcc: [email protected]' . "\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=ISO-8859-1\n";
mail($email, $subject, $body, $headers);
which seems ok but one thing.... can i set the smtp info like this
server="smtp.something.net",
username="[email protected]",
password="asda.1sda",
port="587"
Upvotes: 0
Views: 226
Reputation:
you can set the server in php.ini, but user\password as php's build in mail does not support authentication. you should look at a third party library (phpmailer) as the php mail() function's very under powered.
Upvotes: 1