Skip to content

Instantly share code, notes, and snippets.

@thehungrycoder
Last active August 25, 2016 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thehungrycoder/2753c7340475a26b7419fbfe09eb7fa4 to your computer and use it in GitHub Desktop.
Save thehungrycoder/2753c7340475a26b7419fbfe09eb7fa4 to your computer and use it in GitHub Desktop.
class HelloMailer < ApplicationMailer
def welcome(user)
headers 'X-MSYS-API': { "options": { "open_tracking": true, "click_tracking": true } }.to_json
mail(to: user.email, subject: 'Welcome!')
end
end
<h1>Hello There</h1>
<p>Check this out</p>
<!--this one will be converted to a tracking link -->
<a href="http://guides.rubyonrails.org/action_mailer_basics.html">Action Mailer Doc</a>
Another link:
<!--This one won't be converted if content type is text/html because it's not linked -->
http://guides.rubyonrails.org/action_mailer_basics.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment