sendgrid icon indicating copy to clipboard operation
sendgrid copied to clipboard

Adds support for setting default "sendgrid_disable" options at mailer level, not just emails

Open gaizka opened this issue 13 years ago • 4 comments

Then you can have:

class AdminMailer < ActionMailer::Base include SendGrid sendgrid_disable :subscriptiontrack

def this_has_subscriptiontrack_disabled ; end def this_has_subscriptiontrack_disabled_too ; end

def this_has_subscriptiontrack_enabled sendgrid_enable :subscriptiontrack end end

gaizka avatar Dec 19 '12 10:12 gaizka

Sorry for delay on addressing this. Is this necessary since the default behavior would be that it's disabled?

stephenb avatar May 14 '13 13:05 stephenb

I may be misunderstand this request, but this isn't the default option for things like :clicktrack or :opentrack. It depends on your settings at the account level, but you may have a mailer where you want those disabled.

In fact I assumed this worked this way and just found out this wasn't working after some testing. So I've had to add sendgrid_disable :clicktrack to each e-mail instead of just once. This would be helpful.

chrisnicola avatar Jan 20 '15 00:01 chrisnicola

+1 from me for the same reason as @chrisnicola. DRY code is good :)

jamesds avatar Dec 10 '15 09:12 jamesds

@stephenb The default behaviour when setting up a new account with Sendgrid is that click and open tracking is enabled on all emails unless a header is set explicitly disabling it. This feature would be very useful as it avoids having to disable click/open tracking in your Sendgrid account.

rstrand avatar Apr 26 '16 10:04 rstrand