diff --git a/README.md b/README.md index 6aaef18..27240ca 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,9 @@ and replace `api-myapikey` and `mydomain.com` with your secret API key and domai To specify Mailgun options such as campaign or tags: ```ruby -class UserMailer < ApplicationMailer - def welcome_email - mail(to: params[:to], subject: "Welcome!").tap do |message| +class UserNotifier < ApplicationMailer + def welcome_email(current_user) + mail(to: current_user.email, subject: "Welcome!").tap do |message| message.mailgun_options = { "tag" => ["abtest-option-a", "beta-user"], "tracking-opens" => true,