Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update JavaMail dependency to 1.6.2, adding support for UTF-8 charset #184

Closed
mommcilo opened this issue Nov 29, 2018 · 7 comments
Closed

Comments

@mommcilo
Copy link

mommcilo commented Nov 29, 2018

Address
test.töst@test.com
is not valid

MailerBuilder.clearEmailAddressCriteria()

doesn't play any role because

org.hazlewood.connor.bottema.emailaddress.EmailAddressValidator#isValidMailbox still return false

Just change email to

test.tost@test.com

it became valid. Using RFC strategy also is not working. According to the latest RFC UTF-8 is valid to be used in emails.

@mommcilo mommcilo changed the title Simple java mail is not support UTF-8 charset Simple java mail is not supporting UTF-8 charset Nov 29, 2018
@mommcilo
Copy link
Author

mommcilo commented Nov 30, 2018

This issue can be closed. Here is example:

https://github.com/mommcilo/test-simple-java-mail

In version 5.1.0 with clearEmailAddressCriteria it works but I used 5.0.1 in which it doesn't work.

@bbottema
Copy link
Owner

bbottema commented Nov 30, 2018

I was just looking at your report! clearEmailAddressCriteria had a bug in previous versions, that's indeed fixed in 5.0.6 (under #167).

@mommcilo
Copy link
Author

mommcilo commented Nov 30, 2018

Still stays a question why EmailAddressCriteria.RFC_COMPLIANT mailer doesn't accept UTF-8 when it became standard. It would be better to have validator, which accepts UTF-8 and validate a lot of other things, then to not have any. If you use example I provided you will see it only works if you use clearEmailAddressCriteria

@bbottema
Copy link
Owner

Perhaps this similar issue sheds some light on the issue: bbottema/email-rfc2822-validator#9

@mommcilo
Copy link
Author

com.sun.mail:javax.mail for example already changed logic according to the specification. And I will add this here in case someone have same problem. In my app this was dependency tree(javax.mail was loaded from spring-boot parent)

[INFO] +- org.simplejavamail:simple-java-mail:jar:5.1.0:compile
[INFO] |  +- com.sun.mail:javax.mail:jar:1.5.6:compile

and even if I use clearEmailAddressCriteria it want pass because this version of javax.mail will not validate positively non asci email.

And then I had to exclude javax.mail and provide explicit dependency to the latest

[INFO] +- org.simplejavamail:simple-java-mail:jar:5.1.0:compile
[INFO]   +- com.sun.mail:javax.mail:jar:1.6.2:compile

Now it works.

@bbottema
Copy link
Owner

bbottema commented Dec 3, 2018

Will update the JavaMail dependency for the 6.0.0 release.

@bbottema bbottema reopened this Dec 3, 2018
@bbottema bbottema added this to the 6.0.0 milestone Dec 3, 2018
@bbottema bbottema changed the title Simple java mail is not supporting UTF-8 charset Update JavaMail dependency to 1.6.2, adding support UTF-8 charset Dec 3, 2018
@bbottema bbottema changed the title Update JavaMail dependency to 1.6.2, adding support UTF-8 charset Update JavaMail dependency to 1.6.2, adding support for UTF-8 charset Dec 3, 2018
bbottema added a commit that referenced this issue Dec 31, 2018
…nd support for authenticated HTTP web proxy
@bbottema
Copy link
Owner

Updated javax.mail version for upcoming release 6.0.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants