Skip to content

Instantly share code, notes, and snippets.

@braidn
Created October 11, 2013 19:54
Show Gist options
  • Save braidn/6941004 to your computer and use it in GitHub Desktop.
Save braidn/6941004 to your computer and use it in GitHub Desktop.
module Quarterly
class GiftMailer < Spree::BaseMailer
def send_it(user, order, plan)
@user, @order, @plan = user, order, plan
subject = "#{Spree::Config[:site_name]} Your gift from #{@plan.name}"
mail(to: @order.gift_email, from: from_address, subject: subject)
end
handle_asynchronously :send_it,
:run_at => Proc.new { 2.minutes.from_now }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment