Re: mail() problems...
| From: | DL Neil | Date: | Fri, 06 Dec 2002 16:37:29 +0000 |
| Subject: | Re: mail() problems... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127280@lists.php.net to get a copy of this message | ||
Anthony,
Do you have an SMTP server on your Win98 localhost?
Recommend you change the PHP.INI SMTP= to say the same as your email
package's server definitions.
=dn
> I'm using MS Win98 and Apache and getting the following after submitting
the
> mail form:
> ..........
> Warning: Failed to Connect in c:\program files\apache
> group\apache\htdocs\send_simpleform.php on line 14
> ............
>
> The html and php scripts follow along with my php.ini settings.
>
> Any help would be appreciated.
>
> Thank you.
> Tony Ritter
>
> The following e-mail has been sent:
> Your Name:
> Linda
>
> Your E-Mail Address:
> linda@worksbyhand.com
>
> Message:
> Test
> .............................
>
>
> //this is the html form
>
> <HTML>
> <HEAD>
> <TITLE>Simple Feedback Form</TITLE>
> </HEAD>
> <BODY>
>
> <FORM METHOD="post" ACTION="send_simpleform.php">
>
>
> <P><strong>Your Name:</strong><br>
> <INPUT type="text" NAME="sender_name" SIZE=30></p>
>
> <P><strong>Your E-Mail Address:</strong><br>
> <INPUT type="text" NAME="sender_email" SIZE=30></p>
>
> <P><strong>Message:</strong><br>
> <TEXTAREA NAME="message" COLS=30 ROWS=5
> WRAP=virtual></TEXTAREA></p>
>
> <P><INPUT TYPE="submit" NAME="submit" VALUE="Send This
> Form"></p>
>
> </FORM>
>
> </BODY>
> </HTML>
> ..............................
> //this is the php script
> <?
> if (($sender_name == "") && ($sender_email == "") &&
> ($message == "")) {
> header("Location:
> http://localhost/simple_form.html");
> exit;
> }
> $msg = "E-MAIL SENT FROM WWW SITE\n";
> $msg .= "Sender's Name: $sender_name\n";
> $msg .= "Sender's E-Mail: $sender_email\n";
> $msg .= "Message: $message\n\n";
> $to = "tony@gonefishingguideservice.com";
> $subject = "Web Site Feedback";
> $mailheaders = "From: My Web Site <> \n";
> $mailheaders .= "Reply-To: $sender_email\n\n";
> mail($to, $subject, $msg, $mailheaders);
> ?>
> <HTML>
> <HEAD>
> <TITLE>Simple Feedback Form Sent</TITLE>
> </HEAD>
> <BODY>
> <H1>The following e-mail has been sent:</H1>
> <P><strong>Your Name:</strong><br>
> <? echo "$sender_name"; ?>
> <P><strong>Your E-Mail Address:</strong><br>
> <? echo "$sender_email"; ?>
> <P><strong>Message:</strong><br>
> <? echo "$message"; ?>
> </BODY>
> </HTML>
> ................
> My php.ini settings are:
>
> [mail function]
> SMTP = localhost ;for win32 only
> sendmail_from = tony@gonefishingguideservice.com ;for win32 only
> ;sendmail_path = ;for unix only,
> may supply arguments as well (default is sendmail -t)
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>