This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/jobs/regular/test_email.rb
Sam f0a122a66c move job files so they live underneath app/ and not in lib/
introduce new setting email_always, that will force emails to send to users regardless of presence on site
2013-10-01 17:04:02 +10:00

19 lines
358 B
Ruby

require_dependency 'email/sender'
module Jobs
# Asynchronously send an email
class TestEmail < Jobs::Base
def execute(args)
raise Discourse::InvalidParameters.new(:to_address) unless args[:to_address].present?
message = TestMailer.send_test(args[:to_address])
Email::Sender.new(message, :test_message).send
end
end
end