[PHP] php.ini configuration for out-of-server mail functions

Source: Internet
Author: User

The PHP mail () function is not available in Windows and needs to be installed SendMail

1. Download Sendmail.zip from http://glob.com.au/sendmail/
2. Extract to C: Under, for example, C:\php\sendmail, the best short path, long path name may cause problems.
3. Modify PHP.ini as follows
Sendmail_path = "C:\wamp\sendmail\sendmail.exe-t"
4. Modify the Sendmail.ini according to your own configuration environment.
It is best to enable debug.log_file,error_logfile for the first time to see if SendMail is in effect.
5. Restart Apache

Use SendMail in conjunction with other SMTP servers, such as smtp.163.com, to send mail. Most mailboxes now require SMTP authentication, so add a user name and password to Sendmail.ini.
PHP.ini configuration (with 163 mailboxes as an example)

The code is as follows: [Mail function]
; For Win32 only.
SMTP = smtp.163.com
Smtp_port = 25
; For Win32 ...

Use SendMail in conjunction with other SMTP servers, such as smtp.163.com, to send mail. Most mailboxes now require SMTP authentication, so add a user name and password to Sendmail.ini.
PHP.ini configuration (with 163 mailboxes as an example)

The code is as follows: [Mail function]
; For Win32 only.
SMTP = smtp.163.com
Smtp_port = 25
; For Win32 only.
Sendmail_from = [email protected]
; For Unix only. Supply arguments as well (default: "Sendmail-t-i").
Sendmail_path = "D:\xampp\sendmail\sendmail.exe-t"

Configure three items, SMTP, Smtp_port, and Sendmail_path
Sendmail.ini Configuration

The code is as follows: [SendMail]
; Must change mail.mydomain.com to your SMTP server
Smtp_server=smtp.163.com
Smtp_port=25
Auth_username=yourusername
Auth_password=yourpassword
[Email protected]

SendMail Online There, if you are using XAMPP, where the face directly brought.
At the same time in the Conf of the virtual host add such a sentence

The code is as follows: Php_admin_value sendmail_path ' D:\xampp\sendmail\sendmail.exe-t [email protected] '

This email address is the user's e-mail address, just add it.

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.