Bug #62154 [Com]: warning

From: Date: Fri, 25 May 2012 14:44:16 +0000
Subject: Bug #62154 [Com]: warning
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-13600@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62154&edit=1 ID: 62154 Comment by: reeze dot xia at gmail dot com Reported by: puja_lakhotiya at yahoo dot co dot in Summary: warning Status: Open Type: Bug Package: Website problem Operating System: windows XP PHP Version: 5.3.13 Block user comment: N Private report: N New Comment: This is not a bug of PHP, The warning message explained everything. Please refer http://php.net/manual/en/function.mail.php in NOTE section. BTW: I recommend search or ask such question on stackoverflow.com :) Previous Comments: ------------------------------------------------------------------------ [2012-05-25 09:37:08] puja_lakhotiya at yahoo dot co dot in Description: ------------ 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() {got such error} Test script: --------------- <html><body> <h2>Aliens Abducted Me - Report an Abduction</h2> <?php $when_it_happened=$_POST['whenithappened']; $how_long=$_POST['howlong']; $how_many=$_POST['howmany']; $alien_description = $_POST['aliendescription']; $what_did=$_POST['whattheydid']; $fang_spotted = $_POST['fangspotted']; $email = $_POST['email']; $other=$_POST['other']; $name=$_POST['firstname'] .''. $_POST['lastname']; $to="pooja.kalantri@gmail.com"; $subject="Abducation Form"; $msg="$name you were abducted $when_it_happened and were gone for $how_long.\n". "Number of alien:$how_many\n". "describe Them:$alien_description\n". "The alien did this:$what_did\n". "Was Fang there? $fang_spotted\n". "I want to add $other"; mail($to,$msg, $subject ,"From:". $email); echo 'Thanks for submiitting form.<br>'; echo 'you were abuducted' . $when_it_happened; echo ' and were gone for ' . $how_long . '<br />'; echo 'Number of alien'. $how_many .'<br/>'; echo 'Describe them: ' . $alien_description . '<br />'; echo 'The alien did this:'. $what_did .'<br/>'; echo 'Was Fang there? ' . $fang_spotted . '<br />'; echo 'Your email address is ' . $email; echo 'I want to add' . $other .'<br/>'; echo 'I am'.$name; ?> </body></html> Expected result: ---------------- get the mail in inbox Actual result: -------------- 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() ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62154&edit=1

« previous php.webmaster (#13600) next »