|
OK I was finally able to get the script to run using my localhost, but when I try to run it in debug mode(F9) I get the following
and the output window says: DBG 7.0.10 Failed to start DBG session Reason: connection to the client at localhost (::1) is not allowed in php configuration (php.ini) Not sure what it means? Visit http://www.nusphere.com/dbg/?err=-100 for troubleshooting. If you didn't intend to run debug session you may want to drop debugger cookie by clicking this button: Debugger request: "421366847102900004;d=1,p=0,c=1" Request found in: "$_COOKIE['DBGSESSID']" Target PHP version: "5.3.x" Server API: "Apache 2.0 Handler" Extensions API: "220090626" Modules API: "20090626" PHP API: "20090626" I have not had a change to research this yet. |
||||||||||||
|
|
I am still unable to get the mail function to work with PHPEd. In May I tried to get PHPEd to work with XAMPP to no avail. I do not want to use XAMPP with PHPEd.
I posted in May and did not understand most of what people were telling me and I could never get mail() to work. Some one must know what I am doing wrong. <!DOCTYPE HTML> <HTML> <HEAD> <TITLE>Untitled</TITLE> <LINK rel="stylesheet" type="text/css" href="my.css"> </HEAD> <BODY> <?php $to = 'WyleySam@comcast.net' ; $subject = "QUICK CONNECT DETAILS"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: Evashomecare' . "\r\n"; $RetVal = mail($to,$subject,$msg,$headers); echo $RetVal ; ?> </BODY> </HTML> |
||||||||||||
|
Guru master
|
The problem is not PhpED.
Based on what you have said in the past, the problem is that your web server configuration that you are using with PhpED means that PHP mail() is incompatible with your mail service. Your other XAMPP web service that you use appears to have a sendmail replacement which makes it compatible with PHP mail() and your mail service. If you cannot use your XAMPP web service with PhpED, then I recommend you do not use PHP mail() and instead use a PHP mailer library. Here's one that a lot of people use https://github.com/PHPMailer/PHPMailer And another one http://swiftmailer.org/ Using a PHP mailer library actually does a huge number of things for you that you will probably either not do or you will do incorrectly if you use PHP mail(). If you want reliable mail then do not use PHP mail(). |
||||||||||||
|
|
What do you mean my server configuration? All I did was install PhpEd and change two parameters. First it worked now it doesn't!!!
What am I supposed to change in the server configuration? I don't even even know where the server configuration is located. Maybe I should uninstall all of PHPEd and then reinstall it. [mail function] ; For Win32 only. SMTP = smtp.comcast.net ;smtp_port = 465 smtp_port = 587 ; For Win32 only. sendmail_from = WyleySam@comcast.net |
||||||||||||
|
Guru master
|
In your post on 18-Nov you said mail never worked. On 19-Nov you say it worked and now it doesn't. You don't say what the error is.
Your header for From: is technically incorrect because it does not contain an email address. Some email servers might accept it, some might not.
Your sample code does not set the $msg variable, so is that set externally or is that a null message? There are many things that you can do with PHP mail() which can cause problems. It can be made to produce well formatted mail messages, but without a bit of coding, it does not produce well formatted mail messages. |
||||||||||||||
|
PHP Mail Function not working |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by