summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-07-24 07:15:41 +0200
committerGitHub <noreply@github.com>2017-07-24 07:15:41 +0200
commit989614f9d5faa11157b232785537eb5cca927649 (patch)
treee15e1350d63ccd5ae39490ce9fc8c7393114aed6
parentd95b46ffb75d70498191f817eb1fd7d919bf7d73 (diff)
parenta98f57ebd0f6ebd2b715d95e85c33482ba629d7d (diff)
downloadnextcloud-server-989614f9d5faa11157b232785537eb5cca927649.tar.gz
nextcloud-server-989614f9d5faa11157b232785537eb5cca927649.zip
Merge pull request #5783 from nextcloud/outlook-max-width
Set max-width of image to 100px in Outlook as well
-rw-r--r--lib/private/Mail/EMailTemplate.php3
-rw-r--r--tests/Settings/Mailer/NewUserMailHelperTest.php6
-rw-r--r--tests/data/emails/new-account-email-custom.html3
-rw-r--r--tests/data/emails/new-account-email-single-button.html3
-rw-r--r--tests/data/emails/new-account-email.html3
5 files changed, 18 insertions, 0 deletions
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index 0ae79345e4c..f924f233f14 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -100,7 +100,10 @@ EOF;
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%%">
+ <!-- convince Outlook to have a max-width of 100px -->
+ <!--[if mso]><table><tr><td width="100"><![endif]-->
<img class="logo float-center" src="%s" alt="%s" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <!--[if mso]></td></tr></table><![endif]-->
</center>
</tr>
</tbody>
diff --git a/tests/Settings/Mailer/NewUserMailHelperTest.php b/tests/Settings/Mailer/NewUserMailHelperTest.php
index a8b67278e77..cee3b15b946 100644
--- a/tests/Settings/Mailer/NewUserMailHelperTest.php
+++ b/tests/Settings/Mailer/NewUserMailHelperTest.php
@@ -182,7 +182,10 @@ class NewUserMailHelperTest extends TestCase {
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
+ <!-- convince Outlook to have a max-width of 100px -->
+ <!--[if mso]><table><tr><td width="100"><![endif]-->
<img class="logo float-center" src="" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <!--[if mso]></td></tr></table><![endif]-->
</center>
</tr>
</tbody>
@@ -415,7 +418,10 @@ EOF;
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
+ <!-- convince Outlook to have a max-width of 100px -->
+ <!--[if mso]><table><tr><td width="100"><![endif]-->
<img class="logo float-center" src="" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <!--[if mso]></td></tr></table><![endif]-->
</center>
</tr>
</tbody>
diff --git a/tests/data/emails/new-account-email-custom.html b/tests/data/emails/new-account-email-custom.html
index a60902ae306..4dd95db0510 100644
--- a/tests/data/emails/new-account-email-custom.html
+++ b/tests/data/emails/new-account-email-custom.html
@@ -23,7 +23,10 @@
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
+ <!-- convince Outlook to have a max-width of 100px -->
+ <!--[if mso]><table><tr><td width="100"><![endif]-->
<img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <!--[if mso]></td></tr></table><![endif]-->
</center>
</tr>
</tbody>
diff --git a/tests/data/emails/new-account-email-single-button.html b/tests/data/emails/new-account-email-single-button.html
index 50763efa5b5..128f4f30db7 100644
--- a/tests/data/emails/new-account-email-single-button.html
+++ b/tests/data/emails/new-account-email-single-button.html
@@ -23,7 +23,10 @@
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
+ <!-- convince Outlook to have a max-width of 100px -->
+ <!--[if mso]><table><tr><td width="100"><![endif]-->
<img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <!--[if mso]></td></tr></table><![endif]-->
</center>
</tr>
</tbody>
diff --git a/tests/data/emails/new-account-email.html b/tests/data/emails/new-account-email.html
index 32568e11b66..273e722e052 100644
--- a/tests/data/emails/new-account-email.html
+++ b/tests/data/emails/new-account-email.html
@@ -23,7 +23,10 @@
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%">
+ <!-- convince Outlook to have a max-width of 100px -->
+ <!--[if mso]><table><tr><td width="100"><![endif]-->
<img class="logo float-center" src="https://example.org/img/logo-mail-header.png" alt="TestCloud" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto">
+ <!--[if mso]></td></tr></table><![endif]-->
</center>
</tr>
</tbody>