How to Send Email from a PHP Script
filed in Computers on Sep.30, 2009
Send email from PHP script is extremely easy. All you need is one function: mail($to, $subject, $body, $headers) This is an example: <?php $to = “recipient@example.com”; $subject = “Hi!”; $body = “Hi,\n\nHow are you?”; $headers = “From: sender@example.com\r\n” . “Cc: ccsender@example.com\r\n” . “X-Mailer: php”; if (mail($to, $subject, $body)) { echo(“<p>Message successfully sent!</p>”); } else { [...]
Comments Off