We will implement the following functions: How to enable your Mac computer to become a localhostmailserver (local email server), and directly send emails; and implement the PHPmail () function in the MacOSX system; modify the main configuration file PHP. INI file: enables the sending of mails by the PHPmail () function in Unix-like systems
We will implement the following functions: How to make your Mac computer A localhost mail server (Local mail server), direct mail sending; PHP mail () in Mac OSX System () function. Modify the main configuration file PHP. ini file to enable the mail sending function of PHP mail () in Unix-like systems
We will implement the following functions:
- How can I enable my Mac computer to become a localhost mail server (Local mail server) and send emails directly;
- Implement the PHP mail () function in Mac OSX;
Modify the PHP main configuration file php. ini and enable the mail sending function of PHP mail () in Unix-like systems:
Sendmail_path = "env-I/usr/sbin/sendmail-t-I"
Restart the Apache server or Nginx server.
Enable email service
The Mail Transmission proxy is mainly implemented by the Mail Transfer Agent (MTA ).Postfix,Sendmail.
However, the mac osx system has pre-installed the Postfix service, so we do not need to install it again. It is OK to directly enable it.
$ Sudo postfix start
Postfix/postfix-script: starting the Postfix mail system
To check whether the Postfix is started, you only need to check whether the process has been created.
Lixi $ ps-ef | grep postfix
0 45793 ???? 1 ?? 0? PM ?????????? 0: 00. 03/usr/libexec/postfix/master
Check where the Postfix is installed?
$ Which postfix
/Usr/sbin/postfix
Test whether the Postfix can be successfully sent by proxy
$ Date | mail-s testing name@gmail.com
View mail sending queue
$ Mailq
-Queue ID--Size--- Arrival Time ---Sender/Recipient ---
9E7D8276E30 *???? 369 Sun Feb 23 18:39:42? User@userdeMacBook-Pro.local
Name@gmail.com
Open Gmail to check whether there is an email with the testing title.
(...)
Read the rest of Mac OSX configure PHP Mail (27 words)
©Li Xi for lixphp, 2014. | Permalink | No comment | Add todel. icio. us
Post tags: Function, Mac, mail, OSX, Postfix, mail Server
Feed enhanced by Better Feed from Ozh