sending mail from localhost



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.
.



Relevant Pages

  • Sendmail not sending WAS email app i can use
    ... > the html doc has a simple name, email, and comment box ... > as long as it is saved as a .php file When I do this, ... ; For Win32 only. ...
    (Fedora)
  • Multiline command line parsing
    ... I am implementing a Python command line from scratch in a Win32 application. ... Examples online ("How do I tell incomplete input from invalid input" in the ...
    (comp.lang.python)
  • Re: Exchange vs PHP
    ... ; For Win32 only. ... I don´t know how connect in that port. ... Sanford Whiteman, Chief Technologist ...
    (microsoft.public.inetserver.iis.smtp_nntp)
  • Re: Why arent you upgrading? - NICK, PLEASE READ
    ... designers from scratch. ... recreate everything from scratch in win32, or throw in the towel and hope ... Even switching to a mixed mode compiler strategy ...
    (borland.public.delphi.non-technical)
  • PHP MAIL on Apache and Windows Server 2003
    ... I am at my wits end here, I am trying to get PHP's mail function send ... We are running the SMTP sever under Windows and are running PHP ... ; For Win32 only. ... echo "Email Has Been Sent ."; ...
    (php.general)