sending mail from localhost
- From: ross@xxxxxxxxxxxxx ("Ross")
- Date: Wed, 13 Jun 2007 11:40:42 +0100
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.
.
- Follow-Ups:
- Re: [PHP] sending mail from localhost
- From: Stut
- Re: [PHP] sending mail from localhost
- Prev by Date: Re: [PHP] need to collect credit card details
- Next by Date: Re: [PHP] sending mail from localhost
- Previous by thread: How to strip html code?
- Next by thread: Re: [PHP] sending mail from localhost
- Index(es):
Relevant Pages
|