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 = 'firstname.lastname@example.org'; $subject = 'test'; $message = 'text'; $headers = 'From: email@example.com' . "\r\n" . 'Reply-To: firstname.lastname@example.org' . "\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?