Skip to content

Commit

Permalink
Display the 'Reply-To' address (Removing angle brackets around email …
Browse files Browse the repository at this point in the history
…addresses)
  • Loading branch information
Yannick243 authored and josaphatim committed Dec 15, 2023
1 parent 9953a77 commit c5c2604
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ezyang/htmlpurifier": "^4.13",
"henrique-borba/php-sieve-manager": "^1.0.0",
"bacon/bacon-qr-code": "^1.0.3 || ^2.0.0",
"php": ">=5.6",
"php": ">=7.3",
"ext-mbstring": "*",
"ext-json": "*",
"ext-curl": "*",
Expand All @@ -53,6 +53,9 @@
"ext-imagick":"To use 2fa, this needs to be installed for the QR code display"
},
"config": {
"platform": {
"php": "7.3"
},
"optimize-autoloader": true,
"allow-plugins": {
"endroid/installer": false
Expand Down
45 changes: 24 additions & 21 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/imap/output_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,15 @@ protected function output() {
}
elseif ($fld == 'reply-to') {
$from = addr_parse($headers['From']);

$replyEmails = array_map(function ($addr) {
return $addr['email'];
}, process_address_fld($headers['Reply-To']));

if (count($replyEmails) === 1 && ($replyEmails[0] === $from['email'])) {
$txt .= '<tr style="display: none;" class="long_header"><th>'.$this->html_safe($name).'</th><td>'.$this->html_safe($value).'</td></tr>';
} else {
$txt .= '<tr class="header_'.$fld.'"><th>'.$this->trans($name).'</th><td>&lt;'.$this->html_safe(join(',', $replyEmails)).'&gt;</td></tr>';
$txt .= '<tr class="header_'.$fld.'"><th>'.$this->trans($name).'</th><td>'.$this->html_safe(join(',', $replyEmails)).'</td></tr>';
}
}
else {
Expand Down

0 comments on commit c5c2604

Please sign in to comment.