Re: mail() question

From: Date: Thu, 22 Jun 2000 01:35:49 +0000
Subject: Re: mail() question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2563@lists.php.net to get a copy of this message
On 21 Jun, Magnus Wooldridge wrote: > Can anyone please assist me with this script? All the fields seem to > be correct, but the mail() function just wont so anything. No mail is > actually sent but the "Thank you" string is displayed so the logic of > the script works. I run PHP4Zend on apache/linux. > > This script is called using <form action="recommend.php3" method=POST> > Thanks, really appreciate anyones input on this. Script follows: > > > <script language="php"> > $nameX = stripslashes($name); > $to_nameX = stripslashes($to_name); > $url = "http://www.somedomain.com; > $message = "Hi $to_nameX, > I think this page might interest you: $url"; > $subject = "$nameX wants your to check out this page!"; > > if (( $to_email_address) && ( $from_email_address)) > > { mail($to_email_address, $subject, $message, "From: > webmaster@ourdomain.com\r\nReply-To:$from_email_address\r\n"); echo > "Thank you!";} > > else {echo "error";} > </script> > > > > Magnus First, check that your php ini file has the correct setting for your mail agent (/usr/lib/sendmail -t on my thing). Second, I doubt that you need the \r in the From. Third, check your system logs to see if there are any clues logged by your mail software. Lastly, if you could tell Outhouse to wrap it's lines like a nice piece of mail software? Cheers -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#2563) next »