programming and software tutorials
Sending emails with PHP
Sending an email is easy using PHP. Create a new file, copy and paste this code, and give it a spin!
<?php // Prepare the data $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com'."\r\n". 'Reply-To: webmaster@example.com'."\r\n". 'X-Mailer: PHP/'.phpversion(); // Send the email mail($to, $subject, $message, $headers); ?>
| Print article | This entry was posted by Chad Challis on February 8, 2010 at 10:24 pm, and is filed under PHP. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |