diff options
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 24 | ||||
-rw-r--r-- | Zotlabs/Module/Dreport.php | 3 | ||||
-rw-r--r-- | include/network.php | 6 | ||||
-rw-r--r-- | view/tpl/dreport.tpl | 2 |
4 files changed, 18 insertions, 17 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 5e5798cac..a7082f45a 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -754,9 +754,9 @@ class Enotify { // generate a multipart/alternative message header $messageHeader = $params['additionalMailHeader'] . - "From: $fromName <{$params['fromEmail']}>\n" . - "Reply-To: $fromName <{$params['replyTo']}>\n" . - "MIME-Version: 1.0\n" . + "From: $fromName <{$params['fromEmail']}>" . PHP_EOL . + "Reply-To: $fromName <{$params['replyTo']}>" . PHP_EOL . + "MIME-Version: 1.0" . PHP_EOL . "Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\""; // assemble the final multipart message body with the text and html types included @@ -764,15 +764,15 @@ class Enotify { $htmlBody = chunk_split(base64_encode($params['htmlVersion'])); $multipartMessageBody = - "--" . $mimeBoundary . "\n" . // plain text section - "Content-Type: text/plain; charset=UTF-8\n" . - "Content-Transfer-Encoding: base64\n\n" . - $textBody . "\n" . - "--" . $mimeBoundary . "\n" . // text/html section - "Content-Type: text/html; charset=UTF-8\n" . - "Content-Transfer-Encoding: base64\n\n" . - $htmlBody . "\n" . - "--" . $mimeBoundary . "--\n"; // message ending + "--" . $mimeBoundary . PHP_EOL . // plain text section + "Content-Type: text/plain; charset=UTF-8" . PHP_EOL . + "Content-Transfer-Encoding: base64" . PHP_EOL . PHP_EOL . + $textBody . PHP_EOL . + "--" . $mimeBoundary . PHP_EOL . // text/html section + "Content-Type: text/html; charset=UTF-8" . PHP_EOL . + "Content-Transfer-Encoding: base64" . PHP_EOL . PHP_EOL . + $htmlBody . PHP_EOL . + "--" . $mimeBoundary . "--" . PHP_EOL; // message ending // send the message $res = mail( diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php index 1538ea278..0fc36dc29 100644 --- a/Zotlabs/Module/Dreport.php +++ b/Zotlabs/Module/Dreport.php @@ -161,7 +161,8 @@ class Dreport extends \Zotlabs\Web\Controller { $o = replace_macros(get_markup_template('dreport.tpl'), array( '$title' => sprintf( t('Delivery report for %1$s'),basename($mid)) . '...', '$table' => $table, - '$mid' => (($encoded_mid) ? $encoded_mid : $mid), + '$mid' => urlencode($mid), + '$safe_mid' => urlencode(gen_link_id($mid)), '$options' => t('Options'), '$push' => t('Redeliver'), '$entries' => $entries diff --git a/include/network.php b/include/network.php index 3e8134a32..c754625cd 100644 --- a/include/network.php +++ b/include/network.php @@ -895,7 +895,7 @@ function email_header_encode($in_str, $charset = 'UTF-8', $header = 'Subject') { // define start delimimter, end delimiter and spacer $end = "?="; $start = "=?" . $charset . "?B?"; - $spacer = $end . "\r\n " . $start; + $spacer = $end . PHP_EOL . " " . $start; // determine length of encoded text within chunks // and ensure length is even @@ -1799,8 +1799,8 @@ function z_mail($params) { $messageHeader = $params['additionalMailHeader'] . - "From: $fromName <{$params['fromEmail']}>\n" . - "Reply-To: $fromName <{$params['replyTo']}>\n" . + "From: $fromName <{$params['fromEmail']}>" . PHP_EOL . + "Reply-To: $fromName <{$params['replyTo']}>" . PHP_EOL . "Content-Type: text/plain; charset=UTF-8"; // send the message diff --git a/view/tpl/dreport.tpl b/view/tpl/dreport.tpl index a6b05b326..89188891d 100644 --- a/view/tpl/dreport.tpl +++ b/view/tpl/dreport.tpl @@ -6,7 +6,7 @@ <i class="fa fa-cog"></i> </button> <div class="dropdown-menu"> - <a href="dreport/push/{{$mid}}" class="dropdown-item" >{{$push}}</a> + <a href="dreport/push/{{$safe_mid}}" class="dropdown-item">{{$push}}</a> </div> </div> {{/if}} |