email - Emailing in PHP -
I've found a lot of tutorials on how to do this, but it does not work. Here is my simple email code:
& lt ;? Php $ name = $ _POST ['name']; $ Email = $ _POST ['email']; $ Phone = $ _POST ['phone']; $ Zone = $ _POST ['zone']; $ Call_time = $ _POST ['call_time']; $ Comment = $ _POST ['comment']; $ '=' My email '; $ Theme = '$ name is interested in your product!'; $ Message = 'name = $ name \ nemail = $ email \ nphone = $ phone \ ntimezone = $ area \ nbest call time = $ call_time \ n message = $ comment'; If (mail ($ $, $ subject, $ message)) {resonant "information was sent successfully."; } Else {echo "information was not sent."; }? & Gt;
(Once I am working it, I will increase security) - so no idea why this is not working? I get a success message, but no email.
OK, so I think I could have been more specific:
- I'm running Mac OS X
- I currently I'm testing my site on MMP (a local Apache, MySQL and PHP server-cheese: D)
- Obviously I put a valid email in the "to" field.
- When I write errors in a log file, any of me
I'm running Mac OS X
PHP is probably sending an email to your local SMTP server (I think this is a postfix) Successfully, you will get your success message and, perhaps, your computer But postfix is not actually configured to send email successfully or port 25 Is blocked by the ISP I or anything else on the email server.
Your PHP is OK. I think you have a SMTP server configuration problem for working.
Comments
Post a Comment