Home>Article>Backend Development> What to do if mac php fails to send email

What to do if mac php fails to send email

藏色散人
藏色散人 Original
2021-09-17 09:41:28 2776browse

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.

What to do if mac php fails to send email

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn