Check reply to and bcc address

This commit is contained in:
M66B
2019-09-08 18:22:48 +02:00
parent 68cb4c559a
commit 003f2c5aa6
27 changed files with 21 additions and 27 deletions

View File

@@ -595,7 +595,7 @@ public class FragmentIdentity extends FragmentBase {
if (!should && TextUtils.isEmpty(email))
throw new IllegalArgumentException(context.getString(R.string.title_no_email));
if (!should && !Patterns.EMAIL_ADDRESS.matcher(email).matches())
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid));
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid, email));
if (!should && TextUtils.isEmpty(host))
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
if (TextUtils.isEmpty(port))
@@ -605,6 +605,11 @@ public class FragmentIdentity extends FragmentBase {
if (!should && synchronize && TextUtils.isEmpty(password) && !insecure)
throw new IllegalArgumentException(context.getString(R.string.title_no_password));
if (!should && !TextUtils.isEmpty(replyto) && !Patterns.EMAIL_ADDRESS.matcher(replyto).matches())
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid, replyto));
if (!should && !TextUtils.isEmpty(bcc) && !Patterns.EMAIL_ADDRESS.matcher(bcc).matches())
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid, bcc));
if (TextUtils.isEmpty(display))
display = null;