From 92072970d72f4fa779dcf17c0ec6b4382fcb115a Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 2 Oct 2013 01:13:03 +0000
Subject: [PATCH] Revise initial email templates

Ticket notice and ticket auto-reply should not be formatted inside a table
since the %{message} or %{response} should be allowed to flow freely in the
email rather than be crammed inside the table.
---
 .../en_US/templates/email/assigned.alert.yaml |   2 +-
 .../templates/email/message.autoresp.yaml     |   2 +-
 .../templates/email/ticket.autoreply.yaml     | 111 ++++++-----------
 .../templates/email/ticket.autoresp.yaml      |   2 +-
 .../en_US/templates/email/ticket.notice.yaml  | 115 +++++++-----------
 5 files changed, 87 insertions(+), 145 deletions(-)

diff --git a/include/i18n/en_US/templates/email/assigned.alert.yaml b/include/i18n/en_US/templates/email/assigned.alert.yaml
index 7c4a1e5a4..7629ae55a 100644
--- a/include/i18n/en_US/templates/email/assigned.alert.yaml
+++ b/include/i18n/en_US/templates/email/assigned.alert.yaml
@@ -13,7 +13,7 @@ notes: |
     member.  Use %{assigner} to distinguish who made the assignment.
 
 subject: |
-    Ticket #%{ticket.number} Assigned to you
+    Ticket Assigned to you
 body: |
     <h3><strong>Hi %{assignee},</strong></h3>
     <p>
diff --git a/include/i18n/en_US/templates/email/message.autoresp.yaml b/include/i18n/en_US/templates/email/message.autoresp.yaml
index 8e86947b4..846a34af0 100644
--- a/include/i18n/en_US/templates/email/message.autoresp.yaml
+++ b/include/i18n/en_US/templates/email/message.autoresp.yaml
@@ -13,7 +13,7 @@ notes: |
     customer web portal and posts a new message there.
 
 subject: |
-    [#%{ticket.number}] Message Received
+    "Message Confirmation"
 body: |
     <h3><strong>Dear %{ticket.name},</strong></h3>
     <p>
diff --git a/include/i18n/en_US/templates/email/ticket.autoreply.yaml b/include/i18n/en_US/templates/email/ticket.autoreply.yaml
index 19f833ea5..10994f66c 100644
--- a/include/i18n/en_US/templates/email/ticket.autoreply.yaml
+++ b/include/i18n/en_US/templates/email/ticket.autoreply.yaml
@@ -13,77 +13,46 @@ notes: |
     Available variables for replacement: %{ticket.*}, %{response}
 
 subject: |
-    Support Ticket Opened [#%{ticket.number}]
+    Support Ticket Opened
 body: |
-    <table cellspacing="0">
-    <tbody>
-    <tr>
-        <td style="vertical-align: middle; border-bottom: 1px solid #ddd;
-            height: 48pt"> <span style="color: rgb(127, 127, 127); font-family:
-            Georgia; font-size: 28pt; font-weight: normal;">We Hear You</span>
-        </td>
-        <td style="border-bottom: 1px solid #ddd;">
-             <img src="cid:6fe1efdea357534d238b86e7860a7c5a" width="94"
-             alt="osTicket Logo (kangaroo)" style="width: 94px; float:
-             right; vertical-align: bottom;" height="53">
-        </td>
-    </tr>
-    <tr>
-        <td style="width:67%; padding-top: 12pt; padding-right: 12pt">
-            <p>
-                Dear %{ticket.name},
-            </p>
-            <p>
-                A request for support has been created and assigned ticket
-                <a href="%{ticket.client_link}">#%{ticket.number}</a> with
-                the following automatic reply
-            </p>
-            <p>
-                Topic: <strong>%{ticket.topic.name}</strong>
-            </p>
-            <p>
-                Subject: <strong>%{ticket.subject}</strong>
-            </p>
-            <p>
-                Submitted: <strong>%{ticket.create_date}</strong>
-            </p>
-            <p>
-                %{response}
-            </p>
-            <p>
-                If need be, a representative will follow-up with you as soon
-                as possible. You can <a href="%{ticket.client_link}">view
-                this ticket's progress online</a>.
-            </p>
-            <p>
-                Your Company Name Team,<br>
-                %{signature}
-            </p>
-        </td>
-        <td style="vertical-align: top; padding-top: 12pt;">
-            <p>
-                 <span style="color: rgb(127, 127, 127);">Company Name<br>
-                 %{signature}</span>
-            </p>
-            <p>
-                 <span style="color: rgb(127, 127, 127);">We hope this
-                 response has sufficiently answered your questions. If not,
-                 please do not send another email. Instead, reply to this
-                 email or <a href="%{ticket.client_link}"><span
-                 style="color: rgb(84, 141, 212);">login to your
-                 account</span></a> for a complete archive of all your
-                 support requests and responses.</span>
-            </p>
-            <p>
-                 <span style="color: rgb(127, 127, 127);">Visit our </span>
-                 <a href="%{url}/kb"><span style="color: rgb(84, 141,
-                 212);">knowledgebase</span></a>
-            </p>
-        </td>
-    </tr>
-    </tbody>
-    </table>
+    <p>
+        <span style="color: rgb(127, 127, 127); font-family: Georgia;
+        font-size: 28pt; font-weight: normal;">We Hear You</span><img
+        src="cid:6fe1efdea357534d238b86e7860a7c5a" width="96"
+        alt="osTicket Logo (kangaroo)" height="54" style="width: 96px;
+        float: right; margin: 0px 0px 10px 10px;">
+    </p>
+    <p>
+         <strong>Dear %{ticket.name},</strong>
+    </p>
+    <p>
+         A request for support has been created and assigned ticket <a
+         href="%{ticket.client_link}">#%{ticket.number}</a> with the
+         following automatic reply
+    </p>
+    <p>
+         Topic: <strong>%{ticket.topic.name}</strong>
+    </p>
+    <p>
+         Subject: <strong>%{ticket.subject}</strong>
+    </p>
+    <p>
+         %{response}
+    </p>
+    <p>
+         Your Company Name Team,<br>
+         %{signature}
+    </p>
+    <hr>
+    <p>
+        <span style="color: rgb(127, 127, 127);">We hope this response has
+        sufficiently answered your questions. If not, please do not send
+        another email. Instead, reply to this email or <a
+        href="%{ticket.client_link}"><span style="color: rgb(84, 141, 212);"
+        >login to your account</span></a> for a complete archive of
+        all your support requests and responses.</span>
+    </p>
     <p style="text-align: center;">
-        <img src="cid:b56944cb4722cc5cda9d1e23a3ea7fbc" width="126"
-        alt="Powered by osTicket" height="19" style="width: 126px;">
+         <img src="cid:b56944cb4722cc5cda9d1e23a3ea7fbc" width="126"
+         alt="Powered by osTicket" height="19" style="width: 126px;"/>
     </p>
diff --git a/include/i18n/en_US/templates/email/ticket.autoresp.yaml b/include/i18n/en_US/templates/email/ticket.autoresp.yaml
index 48d1c2294..1f3a11d7f 100644
--- a/include/i18n/en_US/templates/email/ticket.autoresp.yaml
+++ b/include/i18n/en_US/templates/email/ticket.autoresp.yaml
@@ -8,7 +8,7 @@ notes: |
     Sent to a user when a new ticket is created
 
 subject: |
-    Support Ticket Opened [#%{ticket.number}]
+    Support Ticket Opened
 body: |
     <table cellspacing="0">
     <tbody>
diff --git a/include/i18n/en_US/templates/email/ticket.notice.yaml b/include/i18n/en_US/templates/email/ticket.notice.yaml
index 3bcf76611..6df4af7ac 100644
--- a/include/i18n/en_US/templates/email/ticket.notice.yaml
+++ b/include/i18n/en_US/templates/email/ticket.notice.yaml
@@ -13,76 +13,49 @@ notes: |
 subject: |
     %{ticket.subject}
 body: |
-    <table cellspacing="0">
-    <tbody>
-    <tr>
-        <td style="vertical-align: middle; border-bottom: 1px solid #ddd;
-        height: 48pt">
-            <span style="color: rgb(127, 127, 127); font-family: Georgia;
-            font-size: 28pt; font-weight: normal;">We're Here For You</span>
-        </td>
-        <td style="border-bottom: 1px solid #ddd;">
-            <img src="cid:6fe1efdea357534d238b86e7860a7c5a" width="94"
-            alt="osTicket Logo (kangaroo)" style="width: 94px; float: right;
-            vertical-align: bottom;" height="53">
-        </td>
-    </tr>
-    <tr>
-        <td style="width:67%; padding-top: 12pt; padding-right: 12pt">
-            <p>
-                 Dear %{ticket.name},
-            </p>
-            <p>
-                 Our customer care team has created a ticket, <a
-                 href="%{ticket.client_link}">#%{ticket.number}</a> on your
-                 behalf, with the following details and summary.
-            </p>
-            <p>
-                 Topic: <strong>%{ticket.topic.name}</strong>
-            </p>
-            <p>
-                 Subject: <strong>%{ticket.subject}</strong>
-            </p>
-            <p>
-                 Submitted: <strong>%{ticket.create_date}</strong>
-            </p>
-            <p>
-                 %{message}
-            </p>
-            <p>
-                 If need be, representative will follow-up with you as soon
-                 as possible. You can <a href="%{ticket.client_link}">view
-                 this ticket's progress online</a>.
-            </p>
-            <p>
-                  Your Company Name Team,<br>
-                  %{signature}
-            </p>
-        </td>
-        <td style="vertical-align: top; padding-top: 12pt;">
-            <p>
-                <span style="color: rgb(127, 127, 127);">Company Name<br>
-                %{signature}</span>
-            </p>
-            <p>
-                <span style="color: rgb(127, 127, 127);">If you wish to
-                provide additional comments or information regarding the
-                issue, please do not send another email. Instead, reply to
-                this email or <a href="%{ticket.client_link}"><span
-                style="color: rgb(84, 141, 212);">login to your
-                account</span></a> for a complete archive of all your
-                support requests and responses.</span>
-            </p>
-            <p>
-                <span style="color: rgb(127, 127, 127);">Visit our</span> <a
-                href="%{url}/kb"><span style="color: rgb(84, 141,
-                212);">knowledgebase</span></a>
-            </p>
-        </td>
-    </tr>
-    </tbody>
-    </table>
+    <p>
+         <span style="color: rgb(127, 127, 127); font-family: Georgia;
+         font-size: 28pt; font-weight: normal;">We're Here For
+         You</span><img src="cid:6fe1efdea357534d238b86e7860a7c5a"
+         width="96" alt="osTicket Logo (kangaroo)" height="54" style="width: 96px;
+         float: right; margin: 0px 0px 10px 10px;">
+    </p>
+    <p>
+         <strong>Dear %{ticket.name},</strong>
+    </p>
+    <p>
+         Our customer care team has created a ticket, <a
+         href="%{ticket.client_link}">#%{ticket.number}</a> on your behalf,
+         with the following details and summary:
+    </p>
+    <p>
+         Topic: <strong>%{ticket.topic.name}</strong>
+    </p>
+    <p>
+         Subject: <strong>%{ticket.subject}</strong>
+    </p>
+    <p>
+         %{message}
+    </p>
+    <p>
+         If need be, representative will follow-up with you as soon as
+         possible. You can also <a href="%{ticket.client_link}">view this
+         ticket's progress online</a>.
+    </p>
+    <p>
+         Your Company Name Team,<br>
+         %{signature}
+    </p>
+    <hr>
+    <p>
+        <span style="color: rgb(127, 127, 127);">If you wish to provide
+        additional comments or information regarding the issue, please do
+        not send another email. Instead, reply to this email or <a
+        href="%{ticket.client_link}"><span style="color: rgb(84, 141, 212);"
+        >login to your account</span></a> for a complete archive of all your
+        support requests and responses.</span>
+    </p>
     <p style="text-align: center;">
-        <img src="cid:b56944cb4722cc5cda9d1e23a3ea7fbc" width="126" height="19"
-        style="width: 126px;" alt="Powered by osTicket">
+        <img src="cid:b56944cb4722cc5cda9d1e23a3ea7fbc" width="126"
+        alt="Powered by osTicket" height="19" style="width: 126px;">
     </p>
-- 
GitLab