
我已經在 Centos 6 上安裝了 ssmtp 並對其進行了配置,這是我的 ssmtp.conf 檔案包含:
[email protected]
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
[email protected]
UseTLS=Yes
UseSTARTTLS=Yes
[email protected]
AuthPass=Mail00Test
FromLineOverride=YES
TLS_CA_FILE=/etc/pki/tls/certs/ca-bundle.crt
發送郵件時,顯示此錯誤:
CANNOT OPEN SMTP.GMAIL.COM:587
答案1
我給你一些提示。認為這些可以解決您的問題。
更改主機名,例如
hostname=localhost
- 轉到下面的鏈接並單擊
Turn on
https://www.google.com/settings/security/lesssecureapps
- 轉到下面的鏈接並單擊
- 檢查檔案 TLS_CA_FILE 是否存在。
然後嘗試發送郵件。