Home>Article>Backend Development> What to do if mac php fails to send email
Solution to the failure of mac php to send emails: 1. Find and open the php.ini file; 2. Add "sendmail_path = sendmail -t -i" or "sendmail_path = /usr/sbin/sendmail -t - i" is enough.
The operating environment of this article: macOS10.15 system, PHP7.1 version, MacBook Air 2019 computer
mac php failed to send email What should I do?
The problem shows:
fatal: open lock file pid/master.pid: unable to set exclusive lock: Resource temporarily unavailable problem.
Solution:
Take a look at the php.ini file and make sure you can see this line:
sendmail_path = sendmail -t -i
or
sendmail_path = /usr/sbin/sendmail -t -i
It shouldn’t There are no quotation marks and there is no semicolon (;) before it. If it doesn't exist or is different, change it to match the line above.
If this doesn't help, take a look at http://switch.richard5.net/2006/08/19/fatal-open-lock-file-pidmasterpid/ and see if it helps. Since you have updated PHP, I suspect postfix is the problem.
Also:
You may have a suffix configuration problem. If the email you are trying to send is not one on your local server, you may want to check /etc/mailnames and /etc/postfix/main.cf for checks for myhostname, mydomain, and myorigin.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if mac php fails to send email. For more information, please follow other related articles on the PHP Chinese website!