mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Allow custom extra separator
This commit is contained in:
parent
747b39ac70
commit
7a3324d241
1 changed files with 2 additions and 1 deletions
|
@ -197,7 +197,8 @@ public class MessageHelper {
|
|||
String name = ((InternetAddress) message.from[0]).getPersonal();
|
||||
if (email != null && !TextUtils.isEmpty(message.extra)) {
|
||||
int at = email.indexOf('@');
|
||||
email = email.substring(0, at) + "+" + message.extra + email.substring(at);
|
||||
boolean separator = Character.isLetterOrDigit(message.extra.charAt(0));
|
||||
email = email.substring(0, at) + (separator ? "+" : "") + message.extra + email.substring(at);
|
||||
Log.i(Helper.TAG, "extra=" + email);
|
||||
}
|
||||
imessage.setFrom(new InternetAddress(email, name));
|
||||
|
|
Loading…
Reference in a new issue