簡體   English   中英

用於生產的 Rails Action 郵件程序

[英]Rails Action mailer for production

我在我的生產環境中使用 Gmail 帳戶,因為我負擔不起郵件主機的費用。 我使用該帳戶向使用 action mailer 的人發送電子郵件。 問題是我的主機是 heroku,正如您所知,它並不總是完全相同的服務器。 因此,每次服務器更改時,我都必須訪問此http://www.google.com/accounts/DisplayUnlockCaptcha以啟用交易https://www.google.com/settings/security/lesssecureapps

每次 dyno 重新啟動時,我都必須重新開始。 我有哪些選擇,我應該怎么做? 非常感謝

我使用了sendgrid ,它是用於生產郵件程序的 heroku 插件,可與 heroku 配合使用。

遵循本教程: https : //devcenter.heroku.com/articles/sendgrid

不過你必須注意:

  1. xxxxxxx_mailer.rb中將 `default from: "xxx@xxx.com" 設置為有效的電子郵件地址。
  2. 將此添加到您的 production.rb config.action_mailer.default_url_options = { :host => 'www.example.com' }

`

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM