Issue #3357920 handle Multipart messages from mimemail
4 unresolved threads
Merge request reports
Activity
mentioned in merge request !9
- Resolved by Malcolm Young
added 1 commit
- b94bc88c - require php-mime-mail-parser/php-mime-mail-parser
- Resolved by Malcolm Young
- Resolved by Malcolm Young
175 $mail['html_headers'] = $html['headers']; 176 $mail['html_body'] = $html['body']; 177 178 $output = [ 179 '#type' => 'container', 180 ]; 181 182 foreach ($mail as $section => $contents) { 183 if (substr($section, 0, 5) == 'other') { 184 continue; 185 } 186 187 switch ($section) { 188 case 'html_body': 189 $encoded = implode('', $contents); 190 $decoded = base64_decode($encoded); this feels a bit hacky - also, what if the email isn't base64 encoded?
ideally we'd use a library to parse the mail - see https://www.drupal.org/project/maillog/issues/2406219#comment-15193424
changed this line in version 9 of the diff
220 * True if it is a boundary line. 221 */ 222 protected function isBoundary($line) { 223 if (str_starts_with($line, '--')) { 224 if (strlen($line) == 43) { 225 return TRUE; 226 } 227 228 if (strlen($line) == 45 && str_ends_with($line, '--')) { 229 return TRUE; 230 } 231 } 232 233 return FALSE; 234 } 235 added 12 commits
-
dc53b81a...baa5d6ca - 4 commits from branch
project:8.x-1.x
- 84227e45 - Issue #3357920: Render HTML message in iFrame
- 2a5da0f5 - Issue #3357920: Render HTML message in iFrame - handle multipart
- 69c984ea - iframe styles and avoid notices
- 7f675abf - require php-mime-mail-parser/php-mime-mail-parser
- d0c52903 - base64_decode
- d170490f - remove composer.json
- e0d06d36 - htmlentities
- 2fbe629c - Update file MaillogController.php
Toggle commit list-
dc53b81a...baa5d6ca - 4 commits from branch
added 1 commit
- da7a2a81 - update boundary check function, use details elements
4 4 5 5 use Drupal\Component\Utility\Html; 6 6 use Drupal\Core\Controller\ControllerBase; 7 use Drupal\Core\Render\Markup; an updated version of this change is in !16
mentioned in merge request !16
Please register or sign in to reply