Feature: Conversation creation email notifications (#576)

* Clean up the mailers

* Disable assignment mailer if setting is turned off

* Email notifications on conversation create

* Specs
This commit is contained in:
Sojan Jose
2020-03-01 19:06:13 +05:30
committed by GitHub
parent d6237dfc59
commit cda65ea339
17 changed files with 160 additions and 31 deletions

View File

@@ -0,0 +1,5 @@
<p>Hi <%= @agent.name %>,</p>
<p>Time to save the world. A new conversation has been assigned to you</p>
<p>Click <%= link_to 'here', app_conversation_url(id: @conversation.display_id) %> to get cracking. </p>

View File

@@ -0,0 +1,5 @@
<p>Hi <%= @agent.name %>,</p>
<p>Time to save the world. A new conversation has been created in <%= @conversation.inbox.name %></p>
<p>Click <%= link_to 'here', app_conversation_url(id: @conversation.display_id) %> to get cracking. </p>

View File

@@ -0,0 +1,14 @@
<p>Hi <%= @contact.name %>,</p>
<p>You have new messages on your conversation.</p>
<table>
<% @messages.each do |message| %>
<tr>
<td>
<b><%= message.incoming? ? 'You' : message.user.name %></b>
</td>
<td>: <%= message.content %></td>
</tr>
<% end %>
</table>