Bug #44120
closed
sender name is not correctly processed in sendNotifyEmail()
Added by Martin almost 12 years ago.
Updated almost 10 years ago.
Description
I just tried this
plugin.tx_felogin_pi1 {
email_from = noreply@email.dk
email_fromName = navn
}
This works perfect, but I wanted to be navn.dk
So I changed it to
plugin.tx_felogin_pi1 {
email_from = noreply@email.dk
email_fromName = navn.dk
}
Now I got
Oops, an error occurred!
Validation failed for: navn.dk <noreply@email.dk>
More information regarding this error might be available online.
(The link for more information is http://wiki.typo3.org/Exceptionv4/1294681467)
What I can see is properly that TYPO3 thinks that fromName is a email and maybe adds this to the email field in swiftmailer?
This is confirmed in TYPO3 4.7.4 and TYPO3 4.7.7
- Subject changed from felogin does not accept name.com in email_fromName to sender name is not correctly processed in sendNotifyEmail()
- Category deleted (
felogin)
- Status changed from New to Accepted
- Priority changed from Could have to Should have
The function just assumes that the given name can be used inside a mail header. It should check for problems or at least transform it in a way which is acceptable for mail headers.
Alternative would be to refactor it and use SwiftMailer directly (in 4.7 the old html mail functions are removed).
- Status changed from Accepted to Under Review
- Status changed from Under Review to On Hold
- Is Regression set to No
This has been done in 6.1 already (implemented this method with the new Mail-API). See #44120.
Backporting this change was not planned back then. Fixing this by refactoring the inner workings to use the Mail-API looks like an attractive solution for 4.5 and 4.7. But consider that this change would most probably break sites which have non-RFC-conformant senderName's / emails right now. Such a breaking change is not expected in a patchlevel release so we should better avoid it in stable released versions.
The workaround solution for you in 4.5 is to turn off the [MAIL][substituteOldMailAPI] setting in the install tool on the sites where you have such situations or try to set a different senderName which does not break.
A non-breaking solution could be included in 4.5 and 4.7 (i.e. following along what you did in Patchsets 1 and 2), but has to be provable complete first (i.e. correctly quoting etc).
- Status changed from On Hold to Closed
Also available in: Atom
PDF