nedimf / maildroid

Maildroid is a small robust android library for sending emails using SMTP server
188 stars 24 forks source link

smtpAuthentication value cannot be false #15

Closed jamiehiggins closed 4 years ago

jamiehiggins commented 5 years ago

The builder allows us to pass a boolean value through for smtpAuthentication but in reality we cannot pass false, because an IllegalArgumentException is thrown.

To Reproduce Create a MaildroidX.Builder with smtpAuthentication(false) and try to send an email

Expected behavior We should be allowed to pass a value of false. If this is not something that can be configured then it should be removed from the builder.

Here is the code that means we can never pass a false value:

if(!smtpAuthentication) throw IllegalArgumentException("MaildroidX detected that you didn't pass [smtpAuthentication] value to the builder!")

nedimf commented 5 years ago

Oh,I will fix it as soon as possible.Thank you :pray: