Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Dont know if someone already answered this

the mail() function

Moderators: macek, egami, gesf

Dont know if someone already answered this

Postby Skyweb » Mon Dec 15, 2003 2:07 am

Hello everyone,

I am at work and could not really check forum to see if
the problem has already been solved on another thread.
:lol:

I got a mail() function problem.

1st of all I got the server with php and the mail server
on same Computer.

checked php.ini and all is ok as the mail is localhost
and email is me@localhost.com

also tried to telnet on port 25 and i get a response from
the mail server.

My problem is that I am still getting the

Warning failed to connect in d:/blablabla.php on line 10

Dont know what happens as i got also the same code server and mail server
on my laptop and it sends the email.

So this can be no mistype in code.

Does someone know how to check or change this so that it can work right?

Thanks in advance and best regards,
Sky
Skyweb
New php-forum User
New php-forum User
 
Posts: 16
Joined: Tue Nov 18, 2003 1:18 am

Postby sigix » Mon Dec 15, 2003 2:39 am

-is your mail server running ?
-which OS ?
-please post the code for review if you like
sigix
php-forum Active User
php-forum Active User
 
Posts: 364
Joined: Mon Jul 14, 2003 9:39 pm
Location: /Earth/Xion

Postby Skyweb » Mon Dec 15, 2003 5:55 am

Email server is running
OS is Winxp

Here is the code.

Sorry late reply.
As said im at work and now replying from a friends PC for dinner.

Code: Select all
<?
$to = "webmaster@skyshield.net";
$subject= "Email de la Web";
$msg = "Compania: $compania,
Nombre: $nombre,
Apellidos: $apellidos
Mensaje: $mensaje,
Email: $correo";
$extra = "From: correo\nReply-To correo\n";
  mail($to, $subject, $msg, $extra);
  echo $to;
echo "<br>";
echo $subject;
echo "<br>";
echo $msg;
  ?>


Thanks for your help.

Brgds,
Sky
Skyweb
New php-forum User
New php-forum User
 
Posts: 16
Joined: Tue Nov 18, 2003 1:18 am


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron