Google

Thursday, February 28, 2008

How do I send mails with PHP?

PHP has a function called mail for that purpose, example (from php.net):

mail("nobody@example.com", "the subject", $message,
"From: webmaster@$SERVER_NAME\r\n"
."Reply-To: webmaster@$SERVER_NAME\r\n"
."X-Mailer: PHP/" . phpversion());

For more information about the function look here:
http://www.php.net/manual/en/ref.mail.php

No comments: