From c8855bb4491e15728c03b500d3604690bd7dc5b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 6 Jun 2016 16:11:54 +0200 Subject: [PATCH] Make emails less ugly in Microsoft Outlook MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … also make source code of emails more ugly for everyone else :( --- com.woltlab.wcf/templates/email_html.tpl | 32 +++++++++++++------ .../templates/email_paddingHelper.tpl | 8 +++++ .../email_registerNeedActivation.tpl | 7 +++- 3 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 com.woltlab.wcf/templates/email_paddingHelper.tpl diff --git a/com.woltlab.wcf/templates/email_html.tpl b/com.woltlab.wcf/templates/email_html.tpl index d6094dbb2b..6bdf480d8f 100644 --- a/com.woltlab.wcf/templates/email_html.tpl +++ b/com.woltlab.wcf/templates/email_html.tpl @@ -1,16 +1,29 @@
{@$content}
+ {capture assign='footer'} {hascontent} - {/hascontent} + {/capture} + {include file='email_paddingHelper' block=true class='footer' content=$footer sandbox=true} {* Do not remove: This table is needed by certain less able email clients to properly support background colors. Don't ask. *}
diff --git a/com.woltlab.wcf/templates/email_paddingHelper.tpl b/com.woltlab.wcf/templates/email_paddingHelper.tpl new file mode 100644 index 0000000000..e18171b88d --- /dev/null +++ b/com.woltlab.wcf/templates/email_paddingHelper.tpl @@ -0,0 +1,8 @@ +{* This construct is needed for Microsoft Outlook: https://litmus.com/help/email-clients/outlookcom-margins/ *} + + + + +
+ {@$content} +
diff --git a/com.woltlab.wcf/templates/email_registerNeedActivation.tpl b/com.woltlab.wcf/templates/email_registerNeedActivation.tpl index 13218b3215..bec7cbcc20 100644 --- a/com.woltlab.wcf/templates/email_registerNeedActivation.tpl +++ b/com.woltlab.wcf/templates/email_registerNeedActivation.tpl @@ -5,9 +5,14 @@ {capture assign='content'}

{lang}wcf.user.register.needActivation.mail.html.headline{/lang}

{lang}wcf.user.register.needActivation.mail.html.intro{/lang} - + + {capture assign=button} + {lang}wcf.user.register.needActivation.mail.html.activate{/lang} + {/capture} + {include file='email_paddingHelper' class='button' content=$button sandbox=true} + {lang}wcf.user.register.needActivation.mail.html.outro{/lang} {/capture} {include file='email_html'} -- 2.20.1