Get the App
SLTechnology News&Howtos  ›  Development  › 

The solution to the failure of sending Mail by php in mac

Shulou Source: shulou.com Published: 2022-06-03 12:25:39 11月15日 Update

This article mainly introduces the solution to the failure of sending email by php in mac. It is very detailed and has a certain reference value. Interested friends must read it!

Mac php failed to send mail solutions: 1, find and open the php.ini file; 2, add "sendmail_path = sendmail-t-I" or "sendmail_path = / usr/sbin/sendmail-t-I".

This article operating environment: macOS10.15 system, PHP7.1 version, MacBook Air 2019 computer

What if mac php fails to send mail?

The question 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 should not have any quotation marks, and there is no semicolon (;) before it. If it does not exist or is different, change it to match the above line.

If that doesn't help, look at http://switch.richard5.net/2006/08/19/fatal-open-lock-file-pidmasterpid/ and see if it helps. Now that you have updated PHP, I suspect that postfix is a problem.

In addition:

You may have a suffix configuration problem. If the email you are trying to send is not from the local server, you may need to check / etc/mailnames and / etc/postfix/main.cf checks myhostname,mydomain and myorigin.

The above is all the contents of this article entitled "the solution to the failure of sending email by php in mac". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Email question help method content method document email email article different one line value interest semicolon suffix boy partner quotation mark what to do? Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS OPPO Reno Shulou Technology MySQL Linux