0afa5c297f
* When an attachment was sent in the reply mailer it was breaking due to the truncating function applied on the last message content. Here the content was empty and so it broke. * Fixed this breakage * Also addressed the issue that if the attachment was there the content was coming empty. With these changes, made the content to have a link to the attachment.
20 lines
497 B
Text
20 lines
497 B
Text
<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>:
|
|
<% if message.attachment %>
|
|
attachment [<a href="<%= message.attachment.file_url %>" _target="blank">click here to view</a>]
|
|
<% else %>
|
|
<%= message.content %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|