mdeanda / lorem

An extremely useful Lorem Ipsum generator!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getEmail() returns adresses with whitespaces

feffi opened this issue · comments

commented

Hi, just encountered the following issue:

Problem: Whitespaces in RFC 5322 local parts of the mail address. It's allowed by RFC 5322 but uncommon to use in a "simple" API.

javax.mail.internet.AddressException: Local address contains control or whitespace in string lester.de la cruz@example.com''`

The code behind this Exception created random mails for testing:

Lorem lorem = LoremIpsum.getInstance();
MimeMessage multipartMessage = new MimeMessage(...);
multipartMessage.setFrom(new InternetAddress(lorem.getEmail()));
...

Solution: Maybe change the "default" behaviour to generate local parts without whitespaces?

should be fixed now. gotta figure out how i did the maven release again to create new release