I'm trying to simply use the mail function. I'm using ubuntu 8.10 and have installed sendmail. My php.ini config is:
; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = /usr/sbin/sendmail -t -i
and for testing purposes my php is:
$to = 'email@example.com'; $subject = 'test'; $message = 'text'; $headers = 'From: firstname.lastname@example.org' . "\r\n" . 'Reply-To: email@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); echo 'message sent';
Can anyone confirm whether this is correct or if i'm going wrong somewhere?