Skip to content
This repository was archived by the owner on Aug 14, 2023. It is now read-only.

Commit 2808654

Browse files
committed
Merge branch 'hotfix/SUPPORT-1293'
2 parents 77c2f6f + c674af2 commit 2808654

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
<?php
2+
3+
/**
4+
* @file
5+
* Code for osto_html_mails.
6+
*/
7+
28
/**
39
* Implements hook_mail_alter().
410
*
511
* Change mail header for all html mails.
612
*/
713
function osto_html_mails_mail_alter(&$message) {
8-
$message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed; delsp=yes';
9-
}
14+
// Check if message contains html and set header accordingly.
15+
if (isset($message['body'][0])) {
16+
$body = $message['body'][0];
17+
// @see https://stackoverflow.com/a/33614682.
18+
if (preg_match('/\/[a-z]*>/i', $body) === 1) {
19+
$message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed; delsp=yes';
20+
}
21+
}
22+
}

sites/all/modules/itk/osto_web_modifications/osto_web_modifications.strongarm.inc

-2
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ Tak fordi du har oprettet dig som bruger på [site:name]. Du kan nu logge ind ve
256256
257257
[user:one-time-login-url]
258258
259-
<a href="[user:one-time-login-url]">HTML link til login</a>
260-
261259
Dette link kan kun bruges til at logge ind, og det sender dig til en side hvor du kan vælge en adgangskode.
262260
263261
Når du har valgt en adgangskode kan du logge ind på [site:login-url] med:

0 commit comments

Comments
 (0)