I’d like to send out a notification email whenever a given topic with a certain category is closed. So far I I have the following event handler defined:
DiscourseEvent.on(:topic_status_updated) do |topic_id, status, enabled| # Send email notification when status == 'closed' end
What is the proper way to do this? Do I need to define my own
ApplicationMailer in my plugin
apps/mailer sub-directory or can I just make a call through Discourse?