Ronald,
I am also looking for a solution for sending mail from forms using PHP in Windows. I researched your replies to the previous person and checked my PHP.ini and code to see if it complied with your instructions. It does comply and I and getting the error: "Warning: mail() {function.funct ion]: smpt DERVER RESPONSE:530 AUTHENTICATION REQUIRED - FOR HELP GO TO
HTTP://HELP.YAHOO.COM/HELP/US/SBC/CL...OP/POP-11.HTML IN d:\iNTERNET\aPA CHED2.2\HTDOCS\ MYSITE\messageS ent.php on line 8.
The error points to my code on line 8 of the messageSent.php code:
Code goes here:
[code]
<?php
$to = "yourname@yours erver.com";
$subject = "This is the message subject";
$body = "this is the message body";
$headers = "From: yourname@yourse rver.com\n";
mail($to,$subje ct,$body,$heade rs); ; this is line 8 of the code
?>
when the code attempts to send the message to my ISP's smtp server, the smtp server refuses the message because , I believe that there is no authentication set for it to use my isp's smtp server.
I use Yahoo and when I went to HTTP://HELP.YAHOO.COM/HELP/US/SBC/CLSL/MAIL/POP/POP-11.HTML,
I found that Yahoo only accepts certain email clients and Yahoo lists them.
There is also some discussion about paying for access to a smpt server, if you wish to send mail from your own site. I may be reading something wrong and I am looking for second opinions and some direction. Can anyone else provide some insight regarding how Yahoo or other ISPs handle this issue.
This may be why so many people are failing to be able to use smtp from their local host servers.
This is code from my PHP.ini file:
-
[mail function]
-
; For Win32 only.
-
SMTP = smtp.pacbell.yahoo.com
-
smtp_port = 25
-
-
; For Win32 only.
-
;sendmail_from = me@pacbell.net
-
-
; 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 =
-
This is the code from my form:
-
<td><form id="form2" name="form2" method="post" action="">
-
<textarea name="body" cols="55" id="body"></textarea>
-
</form> </td>
-
</tr>
-
<tr>
-
<td> </td>
-
<td><form id="form3" name="form3" method="post" action="">
-
<input type="submit" name="Submit" value="Submit" />
-
</form> </td>
-
</tr>
-
The form and this code work well. My ISP seems to refuse to take messages from outside servers and or email clients other than those listed in the help page.
Is their a work around for this?