Configure PHPMail for MacOSX

Source: Internet
Author: User
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:

  1. How can I enable my Mac computer to become a localhost mail server (Local mail server) and send emails directly;
  2. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.