Hello, I am having a problem sending mail with php while hosting my own website with apache on my mac. First of all I would like to note that I do not have a large background with web hosting and php. Everything that I did so far was just suggestions from online articles and other forums, so please include detail with any answers.
I have apache started, and my website hosted just fine. I can also view php pages so I know php is running too. My problem is using the php mail() function.
I have a simple form in my site who's action attribute is set to results.php. In the results.php file I have the mail() function (along with html code displaying "thank you...blah blah blah") sending info from the form to my email address. I never get an error on the php side, but my mail never gets sent.
Is there some type of setting in a config file that need to be turned on or changed?
Here is what I have done/modified so far from my research from online articles. i dont know what some of them mean, but followed the steps correctly:
I opened the mail.log file and here are some entries from today:
Any other suggestions on how to get this to work? I have also created a simple php file that sends mail without retreiving info from a form and also tried using several different email addresses to send to and from, but still nothing
I have apache started, and my website hosted just fine. I can also view php pages so I know php is running too. My problem is using the php mail() function.
I have a simple form in my site who's action attribute is set to results.php. In the results.php file I have the mail() function (along with html code displaying "thank you...blah blah blah") sending info from the form to my email address. I never get an error on the php side, but my mail never gets sent.
Is there some type of setting in a config file that need to be turned on or changed?
Here is what I have done/modified so far from my research from online articles. i dont know what some of them mean, but followed the steps correctly:
- Edited the /etc/hostconfig file and added the line MAILSERVER=-YES-
- Edited the /etc/postfix/main.cf file and uncommented the #myhostname = ...line and made it "myhostname = localhost" (without quotes)
- Edited the php.ini file to the following - The line under where it says
; For unix only. You may supply arguments as well (default: "sendmail -t -i")Sendmail_path = usr/sbin/sendmail -t -i
I opened the mail.log file and here are some entries from today:
Code:
Jul 9 08:16:50 new-host postfix/master[689]: daemon started -- version 2.4.3, configuration /etc/postfix
Jul 9 08:16:50 new-host postfix/qmgr[691]: 4B4DC2E8331: from=<[email protected]>, size=323, nrcpt=1 (queue active)
Jul 9 08:16:50 new-host postfix/qmgr[691]: 7A8242EE3C0: from=<[email protected]>, size=280, nrcpt=1 (queue active)
Jul 9 08:16:50 new-host postfix/qmgr[691]: B1C052EE3C4: from=<[email protected]>, size=280, nrcpt=1 (queue active)
Jul 9 08:16:50 new-host postfix/qmgr[691]: C281C2EE3C5: from=<[email protected]>, size=327, nrcpt=1 (queue active)
Jul 9 08:16:50 new-host postfix/smtp[694]: 4B4DC2E8331: to=<[email protected]>, relay=relay.verizon.net[206.46.232.11]:25, delay=213262, delays=213261/0.05/0.86/0, dsn=4.0.0, status=deferred (host relay.verizon.net[206.46.232.11] refused to talk to me: 571 Email from 74.102.108.224 is currently blocked by Verizon Online's anti-spam system. The email sender or Email Service Provider may visit http://www.verizon.net/whitelist and request removal of the block. 100709)
Jul 9 08:16:51 new-host postfix/pickup[690]: 0F5D22EE4DB: uid=70 from=<_www>
Jul 9 08:16:51 new-host postfix/cleanup[692]: 0F5D22EE4DB: message-id=<20100709121651.0F5D22EE4DB@localhost>
Jul 9 08:16:51 new-host postfix/qmgr[691]: 0F5D22EE4DB: from=<[email protected]>, size=333, nrcpt=1 (queue active)
Jul 9 08:16:51 new-host postfix/smtp[695]: 7A8242EE3C0: to=<[email protected]>, relay=relay.verizon.net[206.46.232.11]:25, delay=27074, delays=27073/0.02/1.1/0, dsn=4.0.0, status=deferred (host relay.verizon.net[206.46.232.11] refused to talk to me: 571 Email from 74.102.108.224 is currently blocked by Verizon Online's anti-spam system. The email sender or Email Service Provider may visit http://www.verizon.net/whitelist and request removal of the block. 100709)
Jul 9 08:16:51 new-host postfix/smtp[697]: C281C2EE3C5: to=<[email protected]>, relay=relay.verizon.net[206.46.232.11]:25, delay=26817, delays=26816/0.02/1.1/0, dsn=4.0.0, status=deferred (host relay.verizon.net[206.46.232.11] refused to talk to me: 571 Email from 74.102.108.224 is currently blocked by Verizon Online's anti-spam system. The email sender or Email Service Provider may visit http://www.verizon.net/whitelist and request removal of the block. 100709)
Jul 9 08:16:51 new-host postfix/smtp[696]: B1C052EE3C4: to=<[email protected]>, relay=relay.verizon.net[206.46.232.11]:25, delay=27174, delays=27173/0.01/1.1/0, dsn=4.0.0, status=deferred (host relay.verizon.net[206.46.232.11] refused to talk to me: 571 Email from 74.102.108.224 is currently blocked by Verizon Online's anti-spam system. The email sender or Email Service Provider may visit http://www.verizon.net/whitelist and request removal of the block. 100709)
Jul 9 08:17:23 new-host postfix/smtp[694]: connect to mx1.comcast.net[76.96.62.116]: Operation timed out (port 25)
Jul 9 08:17:50 new-host postfix/master[689]: master exit time has arrived
Any other suggestions on how to get this to work? I have also created a simple php file that sends mail without retreiving info from a form and also tried using several different email addresses to send to and from, but still nothing