[英]ActionView is missing template in Preview. How to resolve?
我目前正在嘗試讓 ActionMailer 發送帶有 Letter_Opener gem 的 email。 當我嘗試使用localhost:3000/mailer/order_mailer查看預覽時,終端會記錄此錯誤: 應用程序/郵件程序/order_mailer.rb : 在瀏覽器上,指出了ma ...
[英]ActionView is missing template in Preview. How to resolve?
我目前正在嘗試讓 ActionMailer 發送帶有 Letter_Opener gem 的 email。 當我嘗試使用localhost:3000/mailer/order_mailer查看預覽時,終端會記錄此錯誤: 應用程序/郵件程序/order_mailer.rb : 在瀏覽器上,指出了ma ...
[英]Rails Action Mailer Issue
我正在嘗試使用 ActionMailer(Rails 默認郵件程序上的 Ruby)將 HTML 代碼作為變量發送。 我有一個帶有簡單變量的示例(這也是 HTML 代碼) 我得到的結果是: 也許我可以上傳整個文件作為模板? 如何在我的變量中寫入 HTML 代碼? ...
[英]ActionMailer with Rails: uninitialized constant UserMailer
當我嘗試UserMailer.welcome.deliver_now時在控制台中出現此錯誤 在我得到這個 NameError 之前,控制台拋出了welcome方法未定義的錯誤。 在此處輸入圖像描述這是我的文件結構。 app/mailers/application_mailer.rb : app ...
[英]ActionMailer with Rails: Missing template user_mailer/welcome with "mailer"
我在運行UserMailer.welcome.deliver_now時在控制台中收到此錯誤 我不確定缺少模板是什么意思。 在 app/mailers 我有application_mailer.rb : 在 app/user_mailer.rb 中: 我的視圖文件路徑如下所示(不確定這是否與問題相關 ...
[英]Rails deliver_later getting Unsupported Argument Type
我已將我的 Rails 應用程序中的郵件傳遞更改為實施deliver_later而不是deliver_now ,並且遇到來自 ActiveJob 的錯誤消息。 舊機制是: 新機制是: 現在,當運行我的測試時,帶有deliver_later方法的行拋出錯誤: Minitest::Unexpected ...
[英]Rake test equivalent for ActionMailer::TestHelper?
我們最近從使用deliver_now發送電子郵件遷移到deliver_later 。 為了在系統重啟時排隊的電子郵件不會丟失,我們使用 Sidekiq 實現了這一點。 當我們使用deliver_now時,我們的 Rake 測試可以測試 email 的發送 對於 Rspec,有assert_enqu ...
[英]Instance variables not appearing in Rails ActionMailer and rspec preview
我有一個 Rails 7 應用程序。 以下是相關的代碼片段: /app/mailers/team_mailer.rb spec/mailers/previews/team_preview.rb /app/views/team_mailer/final_survey_nag_email.html ...
[英]How to pass dynamic scope params to Ruby on Rails Mailers?
在我的 Rails 7 應用程序中,我設置了以下路由: 例如,這將生成如下路線: 在我的 ApplicationController 中,我設置了url_options以便在每個請求中保留@current_account 。 這在整個應用程序中都可以正常工作,但在所有郵件程序中除外。 每當我嘗試觸 ...
[英]Change I change the order of Rails Preview Mailers?
我知道這可能是一個奇怪的請求,但我有一個正在構建的應用程序 (Rails 7),它非常重 email。 當我訪問默認郵件預覽時; 在我的例子中/rails/mailers/team ,我希望按特定順序列出郵件。 除了它們有很多電子郵件之外,它們是按時間順序排列的,如果我可以在預覽頁面上按特定順序列 ...
[英]Sendgrid emails being sent without the template
我的 sendgrid 電子郵件發送正常,但從未加載模板。 我已經多次嘗試使用許多模板,但從未調用過它們,所以我的調用一定有問題。 這是來自 controller 的電話: 這是我的 admin_mailer.rb 這是來自 rails 的 output: 找不到很多關於模板問題的文檔。 ...
[英]Multipart email with ical attachment displays incorrectly
我不確定這是否是我的代碼、 ActionMailer 、 Mail或什至是icalendar gem 的問題? 用戶注冊一個事件,他們會得到一個帶有 ical 附件的 email:# app/mailers/registration_mailer.rb class RegistrationMail ...
[英]Actionmailer on Redmine outputs error "certificate verify failed (self signed certificate)" on email send
我將 Bitnami Redmine package 從版本 4.2.1-0 更新到版本 5.0.2-2。 我成功地將所有數據遷移到新服務器,但現在 actionmailer 不再工作了。 當我嘗試發送測試消息時,出現錯誤消息“發送郵件時發生錯誤(SSL_connect returned=1 er ...
[英]How can I use ActionMailer previews in a Sinatra app?
我有一個帶有用於發送電子郵件的 ActionMailer gem 的 Sinatra Ruby 應用程序。 email 發送功能工作正常,但我不知道如何使用預覽功能進行開發。 我的 mailer mailer.rb位於lib/companyname/mailers ,我的預覽mailer_pre ...
[英]Rails ActionMailer Quoted Printable Encoding breaks the output
I have this html message that I would like to send using MIME format through a rest api call ( using microsoft send email api ). @message = "<met ...
[英]Testing ActionMailer with both paramaters and arguments
如何測試同時使用參數和 arguments 的郵件方法。 這些斷言都不起作用: ...
[英]NoMethodError (undefined method `timeout' for #<Net::SMTP smtp.gmail.com:587 started=false>):
Rails 7 沒有收到來自 action mailer 的電子郵件。 它形成了電子郵件,然后我收到一個錯誤 500,說 #<Net::SMTP smtp.gmail.com:587 started=false> 沒有方法超時 我花了幾個小時在這我嘗試了許多不同的配置,有人可以指導我了 ...
[英]Rails: How to configure the logger for the Rails Action Mailer
我想設置 Rails Action Mailer 的記錄器選項,但我發現的唯一信息是ruby on rails guides Action Mailer Configuration 上的這些行記錄器:如果可用,生成有關郵件運行的信息。 可以設置為 nil 表示不記錄。 與 Ruby 自己的 Logg ...
[英]Action Mailer not working, cannot figure out why
我第一次嘗試使用 Action Mailer 並且是一名學生。 我幾周前在一個項目上設置了 AM,但認為它不起作用。 今天,我進入附加到 AM 的電子郵件帳戶,在“已發送”文件夾中看到 AM 發送了一些消息。 我沒有意識到它正在工作,因為我使用了虛假的目標電子郵件地址,而且我不明白這些消息會在原始 ...
[英]After upgrading Rails from 6.1.1 to 7.0.3 my Devise mailers can't be initialized
我開始將我的應用程序從 Rails 6.1.1 升級到 7.0.3。 在這樣做的同時,我還必須將 Devise 從4.7.3升級到4.8.1 。 使用舊設置一切正常。 現在升級后我無法啟動以下任何一項: 導軌服務器 導軌控制台 rspec 規范 耙軌:更新 它們都失敗並顯示以下錯誤 ...
[英]Rails mail_form, can't send attachment
**更新 當我將= f.file_field設置為multiple: true時,我無法發送附件。 如果 file_field 設置為只發送一個文件 -它可以工作! . 在強大的參數中,我有: 我目前不能發送多個文件。 我嘗試在強參數中設置 , :file[]和files:[] ,並將:fi ...