mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 00:25:03 +08:00
[isomorphic-core] Handle weird MIME edge case with @ symbol
Summary: Something weird happens with the mime building when the participant name has an @ symbol in it (e.g. a name and email of hello@gmail.com turns into 'hello@ <gmail.com hello@gmail.com>'), so replace it with whitespace. Test Plan: manual Reviewers: evan, mark, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D4363
This commit is contained in:
parent
be4b0d773c
commit
e8957b787e
1 changed files with 4 additions and 1 deletions
|
@ -8,7 +8,10 @@ import {convertSmtpError} from './smtp-errors'
|
|||
const MAX_RETRIES = 1;
|
||||
|
||||
const formatParticipants = (participants) => {
|
||||
return participants.map(p => `${p.name} <${p.email}>`).join(',');
|
||||
// Something weird happens with the mime building when the participant name
|
||||
// has an @ symbol in it (e.g. a name and email of hello@gmail.com turns into
|
||||
// 'hello@ <gmail.com hello@gmail.com>'), so replace it with whitespace.
|
||||
return participants.map(p => `${p.name.replace('@', ' ')} <${p.email}>`).join(',');
|
||||
}
|
||||
|
||||
class SendmailClient {
|
||||
|
|
Loading…
Reference in a new issue