cfmail only validates emails when spooling

Description

if you omit the from address for cfmail it throws an error, however, it's only when the mail is spooled, that email addresses are parsed using javax.mail.internet.InternetAddress and maybe set to null if they are invalid.

https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/net/mail/MailUtil.java#L189

It would be more developer friendly if these processing/checks via javax.mail.internet.InternetAddress were applied before spooling, i.e when the cfmail tag is called so an exception can be thrown (i.e. invalid email address)

Environment

None

Assignee

Pothys - MitrahSoft

Reporter

Zac Spitzer

Priority

Major

Fix versions

Sprint

Affects versions

Configure