From 1d5e7b3ceeaeed2bd49e6d67bcbb768abc9cae90 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 9 Apr 2020 10:33:23 +0200 Subject: Fix notification mails height issue in Nextcloud Mail Signed-off-by: Jan-Christoph Borchardt --- lib/private/Mail/EMailTemplate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 9148995aaa0..edb6965f889 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -88,7 +88,7 @@ class EMailTemplate implements IEMailTemplate { - +
-- cgit v1.2.3 From 43371c9f7ca9ad4dcf4ecdde61a30414748214ec Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 9 Apr 2020 10:55:10 +0200 Subject: Notification mails: Adjust vertical spacing Signed-off-by: Jan-Christoph Borchardt --- lib/private/Mail/EMailTemplate.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index edb6965f889..758a5e57ab8 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -132,7 +132,7 @@ EOF; - +
  
@@ -165,13 +165,6 @@ EOF;
- - - - - - -
 
EOF; protected $bodyText = << Date: Thu, 9 Apr 2020 10:55:43 +0200 Subject: Notification mails: Logo bar/box to circle so it stands nicely on its own Signed-off-by: Jan-Christoph Borchardt --- lib/private/Mail/EMailTemplate.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 758a5e57ab8..38e741f0713 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -78,14 +78,14 @@ class EMailTemplate implements IEMailTemplate { protected $head = << - + - + - + @@ -106,17 +106,17 @@ EOF; EOF; protected $header = << +
- +
-
+
-- cgit v1.2.3 From fbef2708d0b8dbce3e764f88c790e0259d4178ab Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 9 Apr 2020 11:32:02 +0200 Subject: Notification mails: Change font to native font stack Signed-off-by: Jan-Christoph Borchardt --- lib/private/Mail/EMailTemplate.php | 84 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 38e741f0713..247cac4a739 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -85,12 +85,12 @@ class EMailTemplate implements IEMailTemplate { - + -
+
- -
+
EOF; @@ -108,11 +108,11 @@ EOF; protected $header = <<
+ - -
+ @@ -132,7 +132,7 @@ EOF;
- +
  
@@ -142,8 +142,8 @@ EOF; - @@ -151,7 +151,7 @@ EOF;
-

%s

+
+

%s

- +
  
@@ -160,24 +160,24 @@ EOF; protected $bodyBegin = <<
+ - - @@ -191,19 +191,19 @@ EOF;
+ EOF; protected $bodyText = <<
+ - - +
-

%s

+
+

%s

-
+ EOF; protected $listItem = << - - - + EOF; @@ -219,25 +219,25 @@ EOF;
-

%s

+
+

%s

-

%s

+
+

%s

- +
  
- @@ -272,25 +272,25 @@ EOF;
+ - - +
+
-
+ -
- %7\$s + + %7\$s
@@ -246,11 +246,11 @@ EOF;
-
+ -
- %9\$s + + %9\$s
@@ -259,7 +259,7 @@ EOF;
- +
  
- @@ -323,22 +323,22 @@ EOF;
+ - - +
+
-
+ -
- %7\$s + + %7\$s
@@ -299,7 +299,7 @@ EOF;
- +
  
- -- cgit v1.2.3 From d582315c101c8ca0c959262a79ac177f25f702ed Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 9 Apr 2020 11:39:25 +0200 Subject: Notification mails: Fix some alignment details and remove shadow Signed-off-by: Jan-Christoph Borchardt --- lib/private/Mail/EMailTemplate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 247cac4a739..e4c6e2ef1a1 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -143,7 +143,7 @@ EOF; @@ -151,7 +151,7 @@ EOF; - +
  
@@ -161,7 +161,7 @@ EOF;
- +
@@ -175,7 +175,7 @@ EOF; -- cgit v1.2.3 From e981669e89206c4eefacc27e88cb5b43ce3d4a12 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 30 Apr 2020 11:16:40 +0200 Subject: Fix notification mail tests Signed-off-by: Jan-Christoph Borchardt --- .../tests/Mailer/NewUserMailHelperTest.php | 250 ++++++++++----------- lib/private/Mail/EMailTemplate.php | 3 +- tests/data/emails/new-account-email-custom.html | 87 ++++--- .../emails/new-account-email-single-button.html | 81 +++---- tests/data/emails/new-account-email.html | 87 ++++--- 5 files changed, 235 insertions(+), 273 deletions(-) diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index 74fc1f7a7f5..3744173f532 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -180,30 +180,30 @@ class NewUserMailHelperTest extends TestCase { $expectedHtmlBody = << - + - + - + -
-

%s

+

%s

+
-
-
+
+
-
- +
+ -
+ -
+
@@ -219,14 +219,14 @@ class NewUserMailHelperTest extends TestCase {
- +
  
- @@ -234,32 +234,25 @@ class NewUserMailHelperTest extends TestCase {
-

Welcome aboard

+
+

Welcome aboard

- +
  
-
- +
+ -
- - - - - - -
 
+
- @@ -268,13 +261,13 @@ class NewUserMailHelperTest extends TestCase {
+ - - +
-

Welcome to your TestCloud account, you can add, protect, and share your data.

+
+

Welcome to your TestCloud account, you can add, protect, and share your data.

- @@ -283,25 +276,25 @@ class NewUserMailHelperTest extends TestCase {
+ - - +
-

Your username is: john

+
+

Your username is: john

- +
  
- @@ -339,22 +332,22 @@ class NewUserMailHelperTest extends TestCase {
+ - - +
+
-
+ -
- Set your password + + Set your password
@@ -310,11 +303,11 @@ class NewUserMailHelperTest extends TestCase {
-
+ -
- Install Client + + Install Client
@@ -323,7 +316,7 @@ class NewUserMailHelperTest extends TestCase {
- +
  
- @@ -366,6 +359,7 @@ class NewUserMailHelperTest extends TestCase {
                                                           
+ EOF; $expectedTextBody = << - + - + - + - +
-
-
+
+
-
- +
+ -
+ -
+
@@ -456,14 +450,14 @@ EOF;
- +
  
- @@ -471,32 +465,25 @@ EOF;
-

Welcome aboard John Doe

+
+

Welcome aboard John Doe

- +
  
-
- +
+ -
- - - - - - -
 
+
- @@ -505,13 +492,13 @@ EOF;
+ - - +
-

Welcome to your TestCloud account, you can add, protect, and share your data.

+
+

Welcome to your TestCloud account, you can add, protect, and share your data.

- @@ -520,25 +507,25 @@ EOF;
+ - - +
-

Your username is: john

+
+

Your username is: john

- +
  
- @@ -576,22 +563,22 @@ EOF;
+ - - +
+
-
+ -
- Go to TestCloud + + Go to TestCloud
@@ -547,11 +534,11 @@ EOF;
-
+ -
- Install Client + + Install Client
@@ -560,7 +547,7 @@ EOF;
- +
  
- @@ -603,6 +590,7 @@ EOF;
                                                           
+ EOF; $expectedTextBody = << - + - + - + - +
-
-
+
+
-
- +
+ -
+ -
+
@@ -697,14 +685,14 @@ EOF;
- +
  
- @@ -712,32 +700,25 @@ EOF;
-

Welcome aboard John Doe

+
+

Welcome aboard John Doe

- +
  
-
- +
+ -
- - - - - - -
 
+
- @@ -746,25 +727,25 @@ EOF;
+ - - +
-

Welcome to your TestCloud account, you can add, protect, and share your data.

+
+

Welcome to your TestCloud account, you can add, protect, and share your data.

- +
  
- @@ -802,22 +783,22 @@ EOF;
+ - - +
+
-
+ -
- Go to TestCloud + + Go to TestCloud
@@ -773,11 +754,11 @@ EOF;
-
+ -
- Install Client + + Install Client
@@ -786,7 +767,7 @@ EOF;
- +
  
- @@ -829,6 +810,7 @@ EOF;
                                                           
+ EOF; $expectedTextBody = << - + @@ -103,6 +103,7 @@ EOF;
                                                           
+ EOF; protected $header = << - + - + - + -
+
-
-
+
+
-
- +
+ -
+ -
+
@@ -38,14 +38,14 @@
- +
  
- @@ -53,32 +53,25 @@
-

Welcome aboard

+
+

Welcome aboard

- +
  
-
- +
+ -
- - - - - - -
 
+
- @@ -87,13 +80,13 @@
+ - - +
-

Welcome to your Nextcloud account, you can add, protect, and share your data.

+
+

Welcome to your Nextcloud account, you can add, protect, and share your data.

- @@ -102,25 +95,25 @@
+ - - +
-

Your username is: abc

+
+

Your username is: abc

- +
  
- @@ -158,22 +151,22 @@
+ - - +
+
-
+ -
- Set your password + + Set your password
@@ -129,11 +122,11 @@
-
+ -
- Install Client + + Install Client
@@ -142,7 +135,7 @@
- +
  
- @@ -184,4 +177,4 @@
                                                           
- \ No newline at end of file + diff --git a/tests/data/emails/new-account-email-single-button.html b/tests/data/emails/new-account-email-single-button.html index d1ce4a1e857..13e0c036c3e 100644 --- a/tests/data/emails/new-account-email-single-button.html +++ b/tests/data/emails/new-account-email-single-button.html @@ -1,28 +1,28 @@ - + - + - + - +
-
-
+
+
-
- +
+ -
+ -
+
@@ -38,14 +38,14 @@
- +
  
- @@ -53,32 +53,25 @@
-

Welcome aboard

+
+

Welcome aboard

- +
  
-
- +
+ -
- - - - - - -
 
+
- @@ -87,13 +80,13 @@
+ - - +
-

Welcome to your Nextcloud account, you can add, protect, and share your data.

+
+

Welcome to your Nextcloud account, you can add, protect, and share your data.

- @@ -102,25 +95,25 @@
+ - - +
-

Your username is: abc

+
+

Your username is: abc

- +
  
- @@ -145,22 +138,22 @@
+ - - +
+
-
+ -
- Set your password + + Set your password
@@ -129,7 +122,7 @@
- +
  
- @@ -171,4 +164,4 @@
                                                           
- \ No newline at end of file + diff --git a/tests/data/emails/new-account-email.html b/tests/data/emails/new-account-email.html index 82bea527518..84ee18479e4 100644 --- a/tests/data/emails/new-account-email.html +++ b/tests/data/emails/new-account-email.html @@ -1,28 +1,28 @@ - + - + - + - +
-
-
+
+
-
- +
+ -
+ -
+
@@ -38,14 +38,14 @@
- +
  
- @@ -53,32 +53,25 @@
-

Welcome aboard

+
+

Welcome aboard

- +
  
-
- +
+ -
- - - - - - -
 
+
- @@ -87,13 +80,13 @@
+ - - +
-

Welcome to your Nextcloud account, you can add, protect, and share your data.

+
+

Welcome to your Nextcloud account, you can add, protect, and share your data.

- @@ -102,25 +95,25 @@
+ - - +
-

Your username is: abc

+
+

Your username is: abc

- +
  
- @@ -158,22 +151,22 @@
+ - - +
+
-
+ -
- Set your password + + Set your password
@@ -129,11 +122,11 @@
-
+ -
- Install Client + + Install Client
@@ -142,7 +135,7 @@
- +
  
- @@ -184,4 +177,4 @@
                                                           
- \ No newline at end of file + -- cgit v1.2.3