Description
The library performs client side validation and fails client side if any of those validations fail (opinionated client). For example, library will fail if the scanForInjectionAttack(...) in MailerHelper.java throws an exception if client passes a subject with containing a \n string. The same applies to many other cases even on the email address format.
Whereas this is "good" thing to have in general, some client have uses cases where a lot of this sanitation and error handling is done server side (server helps clients in some sense).
Detecting on client side is excellent, but failing to send is a huge back-compat issue for clients moving to use this library, but whose server has traditionally done most of the checks/cleanups up to now (i.e. server accepts a subject with a \n and sanitizes for clients).
This can trigger failures on client side that were not there before and that the server was handling up to now, and client ends up with emails that simply cannot be sent using this library, whereas before they could be sent with the issues present.
The ask is to expose the validator as a class that clients can run on their own to detect this issues and fix them reactively, while also allowing them to disable such validation when sending the email to the server so that emails can continue to flow to a server that accepted them before.