sending mail from localhost
| From: | Ross | Date: | Wed, 13 Jun 2007 10:40:42 +0000 |
| Subject: | sending mail from localhost | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-256827@lists.php.net to get a copy of this message | ||
I usually use a phpmailer class but am creating something from scratch.
when I use the most basic example I can find:
$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();
mail($to, $subject, $message, $headers);
I get this error
<mail.blue-fly.co.uk>: sender address must contain a domain
I am trying to send via my mail so have changed the lines in .ini to
[mail function]
; For Win32 only.
SMTP = mail.blue-fly.co.uk
smtp_port = 25
; For Win32 only.
sendmail_from = mail.blue-fly.co.uk
Thanks.