"powerboy" <powerboyrarextreme.com> wrote in message
news:3f46653d$0$23613$5a62ac22freenews.iinet.net. au...Additionally, the $from variable must be a valid header, so change it to:> "scott john" <makkia55hotmail.com> wrote in message news:avt1b.20919$mU6.32889newsb.telia.net...>> > Hello
> > Im trying to send a mail from a php-program. Im using a test program and the
> > code for this is as follows:
> > <?php
> > $from = [email]memyaddress.com[/email]";
> > $subject = "Test";
> > $to = 'me2myaddress.com;
> > $mailbody = 'mailbody';
> > mail($to,$subject,$message,$from);
> > ?>
> > When I run the page/program I get the following error msg displayed:
> > "Warning: Failed to Connect in G:\home\server\users\me.com\cgi-bin\send.php
> > on line 5"
> > The mail is not delivered. I also tried with <> before and after the value
> > in the $form. And, of course, the addresses are really ones and both are
> > presents on the server. Does anyone know what the problem could be?
> > <phpbeginner>
> Have you defined an SMTP server in php.ini ?
$from = "From: [email]memyaddress.com[/email]";
You may also need to check which version of PHP you're using, since this header may not be honoured
in your version.