Phabricator 在 centos 系统下发送 Email的配置

前言

phabricator 配置email 其实很简单,配好smtp 服务器、端口、协议、用户名和登陆密码,但过程却好麻烦。
开始时跟着官网配 sendmail ,又 google 又 baidu,折腾了1天还是不行。快要放弃时,换了成 SMTP,竟然成功了,真是踏破铁鞋无觅处...

配置

1. 配置mail-adapter

管理员身份登陆 phabricator 后台:进入 config -> mail -> metamta.mail-adapter 选择 PhabricatorMailImplementationPHPMailerAdapter 【如图】

2. 配置 phpmailer

这个只能再服务器后端用命令配置了,进入 phabricator 所在的目录

运行一下命令

bin/config set phpmailer.mailer smtp
bin/config set phpmailer.smtp-host smtp.163.com -- 和下面的 smtp-user 一致的服务器,我只试过 163的
bin/config set phpmailer.smtp-port 465 -- 确保 465端口未被防火墙 block,如果不行也可试下用 25 端口
bin/config set phpmailer.smtp-protocol SSL 
bin/config set phpmailer.smtp-user your@163.com -- 你的账号
bin/config set phpmailer.smtp-password auto password  -- 注意这不是登陆163的密码,而是在163邮箱设置开通 POP3/SMTP 时设置的授权码

不需要重启 phd 就起效的
可通过下面命令查看配置的值

cat conf/local/local.json

查看邮件发送状态

bin/mail list-outbound

查看某个邮件发送详情

bin/mail show-outbound --id 25

--id 25 是指查看 id 未 25 的邮件发送详情,可以查看发送失败的原因

posted @ 2017-07-29 16:50  Grissom007  阅读(2270)  评论(0编辑  收藏  举报