WWW.ELOGY.ORG
SHARING EXPERIENCE · SOLVING PROBLEM

[SYNOLOGY] How to Configure SMTP mail via PHP

[SYNOLOGY] How to Configure SMTP mail via PHP

Since Synology Web Station released. PHP function had been combine in Web Station GUI. The problem is the configuration of the ssmtp application, which is broken for now. I have no idea if Synology will fix it or not.
To make smtp via php work properly. You should 1.Install the Synology Mail Server application. 
Note:If you want to use an external mail server (as I do), you MUST set it up as an SMTP relay.

This is what I have done, since I run my own mail server on a different box. I assume you can also set it up to relay through other email services such as Gmail .

2.Once you have set up Mail Server, make the following changes from a command prompt session, open php.ini file with Web station GUI.
smtp: localhost
sendmail_from = youremail@yourprovider
sendmail_path = /var/packages/MailServer/target/sbin/sendmail -t

3.After restarting Apache the ini-file gets loaded, and PHP can send mails again.
To access terminal via ssh: ssh username@serveraddress (remember to enable 22 port for ssh)
synoservicectl –restart httpd-user

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料