PDA

View Full Version : Can't send an email from a server.



imported_theguaz
June 22nd, 2005, 04:24 PM
Hi, i can't send an email from a client's server, here is the info PHP of the server:

http://www.theguaz.com/playmovil/diarehm/phpinfo.php.htm

and here is the code that i'm using:

<?php

$to = "info@diarehm.com" . ", " ;
$to .= "info@larisse.net";
$msg = "$name\n\n";
$msg .= "$phone\n\n";
$msg .= "$email\n\n";
$msg .= "$comment\n\n";
$mailheader = "From: $email\r\n";
mail($to, "CONTACTO DESDE PAGINA WEB", $msg, $mailheader );
?>

The thing is for now i did a conection betwen the swf located on the server of my client and my form in my server to send the emaill from there, here is the code for the calling movie:

System.security.allowDomain("http://www.theguaz.com");
loadMovieNum("http://www.theguaz.com/playmovil/diarehm/contacto.swf", 1);

My client is satisfied with this but i'm really concerned about why i couldn't sent the emails from his server.

The client's server is windows based, it has something to see with that??
By the way i'm sending the variables from a flash form, here is the code for the send btn:


on (release, keyPress "<Enter>") {
if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
status = "Ingrese un e-mail válido";
} else if (!name.length) {
status = "Ingrese su nombre";
} else if (!comment.length) {
status = "Escriba su mensaje";
} else {
_root.form.gotoAndStop(2);
_root.form.loadVariables("http://www.theguaz.com/playmovil/diarehm/form.php", "POST");
}
}


Any help will be very useful.

theguaz

brainy
June 23rd, 2005, 11:30 PM
PHP needs to be configured with an SMTP server to use for sending mail. Unless it's properly configured, sending mail won't work.

jw06
June 28th, 2005, 07:06 PM
Yea, make sure that there is an SMTP server running.. such as sendmail or something...

sWo0p
June 29th, 2005, 02:17 AM
there are numerous topics about this on Kirupa already... do a search

teiz77
June 29th, 2005, 03:17 AM
on windows you must manually set a smtp server in your php.ini. This can be the server your isp provides you. You can also use the localhost if there is an smtp server installed.

theguaz
June 29th, 2005, 04:44 PM
thank's to all of you


theguaz