Chatwoot/app/mailers/assignment_mailer.rb
Sojan Jose 6a2f4e6673 Chore: Ability to configure Mailer sender emails [#339] (#342)
* Chore: Ability to configure Mailer sender emails [#339]

fixes : #339
fixes : #330

* update the documentation
2019-12-03 22:54:08 +05:30

12 lines
435 B
Ruby

class AssignmentMailer < ApplicationMailer
default from: ENV.fetch('MAILER_SENDER_EMAIL', 'accounts@chatwoot.com')
layout 'mailer'
def conversation_assigned(conversation, agent)
return if ENV.fetch('SMTP_ADDRESS', nil).blank?
@agent = agent
@conversation = conversation
mail(to: @agent.email, subject: "#{@agent.name}, A new conversation [ID - #{@conversation.display_id}] has been assigned to you.")
end
end