Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 62794 invoked from network); 27 Mar 2010 02:21:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Mar 2010 02:21:27 -0000 Received: (qmail 3174 invoked by uid 500); 27 Mar 2010 02:21:24 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 3154 invoked by uid 500); 27 Mar 2010 02:21:24 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 3146 invoked by uid 99); 27 Mar 2010 02:21:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Mar 2010 02:21:24 +0000 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=AWL,DEAR_SOMETHING,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@itech7.com designates 209.85.160.173 as permitted sender) Received: from [209.85.160.173] (HELO mail-gy0-f173.google.com) (209.85.160.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Mar 2010 02:21:19 +0000 Received: by gyd5 with SMTP id 5so5070755gyd.18 for ; Fri, 26 Mar 2010 19:20:53 -0700 (PDT) Received: by 10.101.202.39 with SMTP id e39mr588793anq.109.1269656452786; Fri, 26 Mar 2010 19:20:52 -0700 (PDT) Received: from [192.168.1.254] ([121.246.205.20]) by mx.google.com with ESMTPS id cm22sm1356234ibb.5.2010.03.26.19.20.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Mar 2010 19:20:52 -0700 (PDT) Message-ID: <4BAD6B7E.50100@itech7.com> Date: Sat, 27 Mar 2010 07:50:46 +0530 From: Nilesh Govindarajan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Shredder/3.0.3 MIME-Version: 1.0 To: users@httpd.apache.org References: <266922.78895.qm@web59308.mail.re1.yahoo.com> In-Reply-To: <266922.78895.qm@web59308.mail.re1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [users@httpd] How to make the code of PHP[mail()] work? On 03/27/2010 07:46 AM, Lee David wrote: > Dear Sir/Madam: > > Good day. I am the beginner for PHP With MySQL. > > I would like to learn PHP With MySQL as my hobby. > > I am trying the code of: > > mail($to, $subject, $msg, 'From:' . $email); > > But the code of mail() is not functioning. > > If anybody is kind enough, please provide some guidances for me to > implement a > proper setting. > > For your info, i am using window XP home edition, Apache server 2.0, PHP > 5.0 & MYSQL 5.1 as my local testing server. > > As per your advices, i have allow internet users to use the service of > SMTP in windows firewall. > > From the review server error log, i be able to observe Warning as below: > > [Sat Mar 13 13:58:17 2010] [error] [client 127.0.0.1] PHP Warning: > mail() [function.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\\test\\report.php on line 30, referer: > http://localhost/report_Temp.html > > If possible, could show me how configure the php.ini and any relevant > setting: > > In my php.ini, i be able to see: > > [mail function] > ; For Win32 only. > SMTP = localhost > smtp_port = 25 > > 2 weeks ago > > ; For Win32 only. > ;sendmail_from = me@example.com > > ; For Unix only. You may supply arguments as well (default: "sendmail -t > -i"). > ;sendmail_path = > > ; Force the addition of the specified parameters to be passed as extra > parameters > ; to the sendmail binary. These parameters will always replace the value of > ; the 5th parameter to mail(), even in safe mode. > ;mail.force_extra_parameters = > > > Thanks. > > Warm Regards, > David Lee > > If you wish to learn PHP, read the PHP manual at www.php.net This is not the place for discussion of PHP, except for its setup, etc. I will give you hint that you need an SMTP server at localhost. For more info, ask on PHP Mailing Lists. -- Nilesh Govindarajan Site & Server Administrator www.itech7.com --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org