OJS on GCE send mail
OJS 如果架在 GCE 上,會因為 GCE 擋掉 SMTP 的功能,
因此需要透過第三方服務來發信,以下為利用 Sendgrid 來達到寄信功能。
- Sendgrid 有兩件事要做
- 取得Sendgrid API KEY:只要有寄信權限就好
- 設定DNS授權:
https://docs.sendgrid.com/ui/account-and-settings/how-to-set-up-domain-authentication - OJS
- config.inc.php要修改一下設定
smtp = On
SMTP server settings
smtp_server = smtp.sendgrid.net
smtp_port = 587
smtp_auth = tls
smtp_username = apikey
smtp_password = pass
smtp_suppress_cert_check = On
allow_envelope_sender = On
default_envelope_sender = youremail@domain.com
force_default_envelope_sender = On
force_dmarc_compliant_from = Ondmarc_compliant_from_displayname = ‘%n’
time_between_emails = 3600
max_recipients = 10
require_validation = Off
validation_timeout = 14
參考資料:
留言
張貼留言