Re: mail function -- not functioning for me!
| From: | m. wright | Date: | Tue, 18 Jul 2000 23:15:50 +0000 |
| Subject: | Re: mail function -- not functioning for me! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7168@lists.php.net to get a copy of this message | ||
Hi Dave,
I chased one like this before and someone on this list helped me out.
The sendmail_path must be in double quotes (even the default provided).
In your php.ini find
; Module Settings ;
[mail function]
sendmail_path = "/usr/sbin/sendmail -t"
It worked for me, hope it helps you, too!
mike w.
Greg Donald wrote:
>
> On Tue, 18 Jul 2000, Dave Turnbull wrote:
>
> > PHP 4.0.1pl2
> > Mac OS X 1.2
> > Apache 1.3.12
> >
> > I have been trying to get a simple mail function to work with PHP -- I want
> > to use it to create a feedback form, eventually. I copied the code from a
> > book, and they say it should work. But, of course, it is not. the actuall
> > code will follow, but I don't think it's an error in the code, because when
> > I put a deliberate error in, php DOES generate an error message for me.
> > Otherwise, no error messages.
> >
> > I think the problem lies in the interaction between PHP and sendmail. The
> > server tells me sendmail is in /usr/sbin and that it is running. This is the
> > path I put in the php.ini, on the "sendmail_path =" line. This line is not
> > commented. I have tried various e-mail send-to addresses, just in case. I
> > know PHP is tracking vars, because it displays the "thank you" message
> > correctly. I also, therefore, know that is not a problem of file location,
> > etc.
> >
> > **CODE FOR HTML FORM**
> > <HTML>
> > <HEAD>
> > <TITLE>Feedback</TITLE>
> > </HEAD>
> > <BODY>
> >
> >
> > <FORM method="POST" action="/php/sendfeedback.php">
> >
> > <P>Your Name:<br>
> > <INPUT type="text" name="sender_name" size=30></p>
> >
> > <P>Your E-Mail Address:<br>
> > <INPUT type="text" name="sender_email" size=30></p>
> >
> > <P>Your Message:<br>
> > <textarea name="message" cols=30 rows=5></textarea>
> > </p>
> >
> > <INPUT type="submit" value="Send This Form">
> >
> > </FORM>
> >
> > </BODY>
> > </HTML>
> > **END OF HTML CODE**
> >
> > **CODE FOR PROCESSING SCRIPT**
> > <?php
> >
> > $msg = "Sender's Full Name:\t$sender_name\n";
> > $msg .= "Sender's E-Mail:\t$sender_email\n";
> > $msg .= "Sender's Message:\t$message\n\n";
> >
> > // use two newline characters at the end of your content,
> > // or to insert additional spacing
> >
> > $mailheaders = "From: ASD Web Site <> \n";
> > $mailheaders .= "Reply-To: $sender_email\n\n";
> >
> > mail("turnbull@enol.com", "Feedback Form", $msg, $mailheaders);
> >
> > echo "<H1 align=center>Thank You, $sender_name</h1>";
> > echo "<p align=center>We appreciate your feedback.</p>";
> >
> > ?>
> > **END OF PHP SCRIPT**
> >
> > Any ideas?
> >
> > Dave
> >
> >
> >
>
> Yes, do you have some type of mail transfer agent installed? I have no
> idea what's available for Mac, but I know you have to tell php what to use
> to send mail.
>
> Greg
>
> --
> ------------------------------------------------------------------------
> destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common
> internet addict, 3. lover of late 80's heavy metal music, 4. Activist
> for the terminally un-elite; see also - cool guy, des, mr. php...
>
> It's 4:00am, your web site is still up, why are you?
> http://destiney.com/
> ------------------------------------------------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net