[TYPO3-core] RFC #17574: defaultMailFromName not used when defaultMailFromAddress is used in mailform

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Feb 23 15:20:04 CET 2011


Jigal van Hemert schrieb am 20.02.2011 15:16:

> This is a SVN patch request.
> 
> Type: Bugfix
> 
> BT reference: http://bugs.typo3.org/view.php?id=17574
> 
> Branches: trunk / 4.5
> 
> Problem:
> In a mailform the senders name and mail address are not always kept
> together. If no mail address is provided (for example because no "email"
> or "from_email" field is present) the defaultFromMailAddress is used.
> The senders name is however used together with this general address and
> not the defaultFromName.
> Furthermore, an empty sender name is kept while only the senders mail
> address should be used.
> 
> Solution:
> If no valid email address of the sender is found use both the
> defaultFromMailAddress and the defaultFromName.
> If no senders name is found just use the senders email address and do
> not use an empty name.
> Also there was some old code left which put double quotes around the
> senders name in some cases. This is not needed anymore
> The replyTo address needed the same cleanup as the from address.
> 
> How to test:
> Create mailform with "name" or "from_name" field, but with "email" or
> "from_email" field. The defaultMailFromAddress mail address is used, but
> with the name from the form.
> If the "name" or "from_name" field is left empty only a pair of double
> quotes is used in the mail.

+1 on reading and testing. Adapted the patch to the latest state of
formmail (had 2 rejects otherwise).

Committed to:
- trunk rev. 10601
- TYPO3_4-5 rev. 10609  (wow, first time this happened to me, 8
revisions in between)

Cheers,
Ernesto



More information about the TYPO3-team-core mailing list