sending mail from localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I usually use a phpmailer class but am creating something from scratch.

when I use the most basic example I can find:

$to      = 'nobody@xxxxxxxxxxx';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@xxxxxxxxxxx' . "\r\n" .
    'Reply-To: webmaster@xxxxxxxxxxx' . "\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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux