webmail: for junk/rejects messages, show sender address instead of name in list

This commit is contained in:
Mechiel Lukkien
2024-03-05 09:04:59 +01:00
parent 79f91ebd87
commit af968f7614
5 changed files with 18 additions and 16 deletions

View File

@ -1100,9 +1100,9 @@ const formatAddressValidated = (a, m, use) => {
return l;
};
// format just the name if present and it doesn't look like an address, or otherwise just the email address.
const formatAddressShort = (a) => {
const formatAddressShort = (a, junk) => {
const n = a.Name;
if (n && !n.includes('<') && !n.includes('@') && !n.includes('>')) {
if (!junk && n && !n.includes('<') && !n.includes('@') && !n.includes('>')) {
return n;
}
return '<' + a.User + '@' + formatDomain(a.Domain) + '>';