Re: Re: mail() function problem

From: Date: Thu, 02 Sep 2004 08:26:31 +0000
Subject: Re: Re: mail() function problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-195517@lists.php.net to get a copy of this message
Thank you Lone , I will try it out "Lone Wolf" <LoneWolf@nc.rr.com> wrote in message news:000001c49097$1bca7110$41000c0c@goliath... > What you need to do is set your SMTP server inside the php.ini file... > > > [mail function] > SMTP = smtp.server.com ; for win32 only > sendmail_from = me@myaddress.com ; for win32 only > ;sendmail_path = ;for unix only, may supply arguments as well ; (default is > sendmail -t) > > The test string I used to make sure my example worked: > <?php > print mail ('johnlim@natsoft.com.my', > 'No need for reply -- PHP test!', /* subject */ > "hi JohnnLine 2n"); /* body */ > ?> > > Robert > > > -----Original Message----- > > From: Dre [mailto:dre00x@yahoo.com] > > Sent: Wednesday, September 01, 2004 6:48 PM > > To: php-general@lists.php.net > > Subject: [PHP] Re: mail() function problem > > > > > > Sorry .. but I'm really so new at this > > I'm using Apache Server on a MS Windows XP Pro. OS, and I'm > > trying to send a mail through a form .. what do I need to > > install or configure to be able to do this. > > > > thanks in advance > > > > > > "Dre" <dre00x@yahoo.com> wrote in message > > news:20040901221630.66181.qmail@pb1.pair.com... > > > I'm using an Apache server .. doesn't it come with a > > sendmail program > > > ?? I really don't know > > > > > > "Jasper Howard" <jasper@velocity7.com> wrote in message > > > news:20040901215708.88680.qmail@pb1.pair.com... > > > > do you have a sendmail program on your testing server? > > > > > > > > -- > > > > > > > > > > > > -------------------------------------------------------------->> > > > > Jasper Howard :: Database Administration > > > > Velocity7 > > > > 1.530.470.9292 > > > > http://www.Velocity7.com/ > > > > <<-------------------------------------------------------------- > > > > "Dre" <dre00x@yahoo.com> wrote in message > > > > news:20040901210525.74839.qmail@pb1.pair.com... > > > > > 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 > > > >

« previous php.general (#195517) next »