You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def sendgrid_test(to_email)
mail(:to => to_email, :subject => "Test", custom_args: {campaign: 'welcome'}) do |format|
format.text { render :plain => "Test message" }
end
end
irb(main):027:0> ApplicationMailer.sendgrid_test("xxx@xxx.com").deliver_now
Rendering text template
Rendered text template (0.1ms)
ApplicationMailer#sendgrid_test: processed outbound mail in 22.7ms
Sent mail to xxx@xxx.com (8.9ms)
Date: Wed, 16 Feb 2022 18:45:23 +0800
From: XXX <no-reply@xxx.com>
To: xxx@xxx.com
Message-ID: <620cd5c3142c2_e78c3fde1243193c94884@MacBook-Air-2.local.mail>
Subject: Test
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
custom-args: {:campaign=>"welcome"}
X-SMTPAPI: {"category":"dev","filters":{"clicktrack":{"settings":{"enable":0}}}}
Test message
NoMethodError: undefined method 'unparsed_value' for #<Mail::OptionalField:0x007fbc2ad7b318>
from (irb):27
The text was updated successfully, but these errors were encountered:
Hi I think this is related to issue #99
OP was using "personalizations" and I'm using "custom_args" (works if i remove custom_args)
Still having this error in Rails 5
Rails 5.1.6
ruby 2.3.1p112
sendgrid-actionmailer-3.2.0
The text was updated successfully, but these errors were encountered: