Sha256: 73e653ea27ae25b0fb3a64e66cfb666af02ee857b23c1a12efc0480285744e89

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 Bytes

Contents

module Mailkick
  module UrlHelper
    def mailkick_unsubscribe_url(subscriber, list, **options)
      token = Mailkick.generate_token(subscriber, list)
      url = mailkick.unsubscribe_subscription_url(token, **options)
      if Mailkick.headers && headers["List-Unsubscribe"].nil?
        headers["List-Unsubscribe-Post"] ||= "List-Unsubscribe=One-Click"
        headers["List-Unsubscribe"] = "<#{url}>"
      end
      url
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mailkick-1.3.1 lib/mailkick/url_helper.rb
mailkick-1.3.0 lib/mailkick/url_helper.rb