解決WordPress無法寄送郵件的窘況
IPFS
等等,這裡不是說信箱無用論,而是你是否真的可以使用信箱嗎?
就我個人使用到現在來講,答案是「No」的,不管是更改郵件地址還是其他動作,我們本來設定的郵件地址是都收不到任何信件的
為什麼會這樣?主要最大的原因就是承租主機端基本上都禁止使用防止濫發大量的垃圾郵件,雖然說有時候一篇信件可能就短短的,郵件大小也就那麼個幾KB,但如果在短時間內發送個幾萬封郵件時,那就是相當驚人的浪費頻寬(但對這些濫發郵件的人來說,垃圾郵件是最省錢的方式,只要有人真的購買服務的話就是賺錢),所以不管是網頁託管(WebHosting)或是虛擬專用服務器(Virtual private server,縮寫為VPS),其實都有做限制防止濫發
這裡將會提供兩種方式來寄送郵件,但前提是要先安裝SMTP相關的外掛並設定,才有辦法寄出郵件
我這邊建議的是安裝Post SMTP外掛
![](https://cyrians.com/wp-content/uploads/2021/06/PostSmtp01-1024x442.png)
![](https://cyrians.com/wp-content/uploads/2021/06/PostSmtp02-1024x374.png)
使用SendGrid寄送郵件
要使用SendGrid寄送郵件,需要先申請SendGrid的帳號,我這邊就先跳過如何申請了
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-001-1024x493.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-002-1024x257.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-003-1024x744.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-004-1024x504.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-005-1024x468.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-006-1024x512.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-007-1024x506.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-009-1024x542.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-008-1024x300.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-010-1024x432.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-011-1024x486.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-012-1024x551.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-013-1024x622.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-014-1024x498.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-015-1024x492.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-016-1024x379.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-017-1024x453.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-018.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-019-1024x414.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-020-1024x445.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-021-1024x411.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-022-1024x411.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-023-1024x486.png)
以上為SendGrid的設定,接著是使用自有的郵件伺服器的設定
透過自己的郵件伺服器寄送郵件
和SendGrid比較起來,用自己的郵件伺服器寄送郵件設定其實簡單許多,設定上和SendGrid比較起來比較簡單,但前提是要先架一台郵件伺服器;關於郵件伺服器的架設,將在後續的文章中提到,這裡先從設定用自己的郵件伺服器寄信
※要注意一點就是記得在郵件伺服器設定此網站IP(VPS提供的IP)的白名單,否則有可能會被郵件伺服器阻擋造成無法寄信
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-005-1024x468.png)
![](https://cyrians.com/wp-content/uploads/2021/06/MailServer_Setting-001-1024x856.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-017-1024x453.png)
![](https://cyrians.com/wp-content/uploads/2021/06/MailServer_Setting-003-1024x394.png)
![](https://cyrians.com/wp-content/uploads/2021/06/SendGridSetting-020-1024x445.png)
![](https://cyrians.com/wp-content/uploads/2021/06/MailServer_Setting-004-1024x280.png)
![](https://cyrians.com/wp-content/uploads/2021/06/MailServer_Setting-005-1024x473.png)
以上為解決WordPress無法寄送郵件的窘況,希望能夠幫到你!
喜欢我的作品吗?别忘了给予支持与赞赏,让我知道在创作的路上有你陪伴,一起延续这份热忱!