[Typo3] No HTML infomail in sr_email_subscribe
Armin Günther
armin.guenther at augusta.de
Mon Oct 17 08:27:03 CEST 2005
Hi Roland,
> I doubt that this is a good idea. I think that this is not the cause of
> the problem you encountered. If it was and if you had effectively html
> emails enabled and if module_sys_dmail_html was effectively set as
> default, I think to the contrary that all infomails would be sent as
> html (the user's preference being ignored).
The problem is only with the infomail triggered when the user enters his
mail-address to edit or delete his account
(tx_sremailsubscribe_pi1[cmd]=infomail).
I analysed the problem quite thoroughly (took me several hours) and
could localize it in class.tx_srfeuserregister_pi1.php statement
# Line 158:
$this->dataArr = $fe[$this->theTable];
# Line 244ff:
if (is_array($this->dataArr)) {
...
$this->parseValues();
...
} else {
$this->defaultValues(); // If no incoming data, this will set the
default values.
...
}
# Line 1453:
$HTMLContent['all'] = ($this->HTMLMailEnabled &&
$this->dataArr['module_sys_dmail_html']) ?
trim($this->cObj->getSubpart($this->templateCode,
'###'.$this->emailMarkPrefix.$key.$this->emailMarkHTMLSuffix.'###')):'';
Now if there is a ###HIDDENFIELDS### marker in ###TEMPLATE_INFOMAIL### then:
1.) in line 158 the array $this->dataArr is populated with an incoming
post variable
2.) is_array($this->dataArr) at line #244 will be true and
3.) parseValues() function in line #246 will set
$this->dataArr['module_sys_dmail_html']=''
4.) This will cause $HTMLContent['all'] in line #1453 to stay empty: no
HTML mail.
But if there is NO ###HIDDENFIELDS### marker in ###TEMPLATE_INFOMAIL###
then:
1.) in line 158 the array $this->dataArr is NOT populated with an
incoming post var
2.) is_array($this->dataArr) at line #244 will be FALSE and
3.) defaultValues() function in line #265 will get the default values
eg. module_sys_dmail_html=1
4.) This will cause $HTMLContent['all'] in line #1453 to be set to
###EMAIL_TEMPLATE_INFOMAIL_HTML###.
Apart from this analysis I can't see any use of the hiddenfields in this
infomail form, as there are no variables set before the user enters his
e-mail address.
Thank you for your great work!
Armin
More information about the TYPO3-english
mailing list