Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@gaizka
Copy link

@gaizka gaizka commented Dec 19, 2012

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

@stephenb
Copy link
Owner

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

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
@chrisnicola
Copy link

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.

@jamesds
Copy link

jamesds commented Dec 10, 2015

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

@rstrand
Copy link

rstrand commented Apr 26, 2016

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.