Re: mail() function problem

From: Date: Thu, 02 Sep 2004 08:25:05 +0000
Subject: Re: mail() function problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-195516@lists.php.net to get a copy of this message
I'm developing uner Windows at home .. but I'm pretty sure that my host is running Unix or Unix like systems on their machines "Pahlevanzadeh Mohsen" <m_pahlevanzadeh@yahoo.com> wrote in message news:20040901230711.66314.qmail@web21427.mail.yahoo.com... > Please install a mailserver until your SMTP server > will be up. > When your SMTP server is down,mail func doesn't work. > My suggesstion: > Please work under UNIX systems. > Yours,Mohsen > --- Dre <dre00x@yahoo.com> wrote: > > > Hi > > I was trying to use the mail() function, but it did > > not work, maybe because > > of some settings problem or something that I can't > > figure out > > > > I went online and tried to execute the following > > > //======================================================= > > <?php > > $from = $_POST['from']; > > $subject = $_POST['subject']; > > $content = $_POST['content']; > > $to = "any_address@yahoo.com"; > > $headers = "From:".$from; > > if(mail($to, $subject, $content, "From: > > $from")) { > > echo"sent"; > > } > > else{ echo "not sent"; > > } > > ?> > > //=============================================== > > the variable values sent from a Form in another and > > they are sent correctly > > > > but I keep having this error > > //=============================================== > > Warning: mail(): Failed to connect to mailserver at > > "localhost" port 25, > > verify your "SMTP" > > and "smtp_port" setting in php.ini or use ini_set() > > in > > C:\Program Files\Apache > > Group\Apache2\htdocs\mysite/myfile.php on line 194 > > //=============================================== > > > > > > my php.ini settings for the mail function are > > > > //============================= > > [mail function] > > ; For Win32 only. > > SMTP = localhost > > > > smtp_port = 25 > > sendmail_from = dre00@yahoo.com > > //============================= > > > > thanks in advance > > Dre, > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > ===== > ---------DIGITAL SIGNATURE------------------- > ///Mohsen Pahlevanzadeh//////// > Network administrator & programmer > My home phone is: +98213810146 > My email address is > m_pahlevanzadeh at yahoo dot com > My website is: http://webnegar.net > ---------------------------------------------------------------- > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail Address AutoComplete - You start. We finish. > http://promotions.yahoo.com/new_mail

« previous php.general (#195516) next »