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 @   Grissom007  阅读(2296)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· 展开说说关于C#中ORM框架的用法!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
点击右上角即可分享
微信分享提示