[TYPO3-dev] mailform using cObj->FORM in own extension

Michael Leupold leupold at bits.ag
Wed Oct 11 01:05:20 CEST 2006


Am Mittwoch, 4. Oktober 2006 17:45 schrieb Peter Russ:
> > I'm trying to develop a small extension for one of my customers. It's
> > basically just an event list with options to book events. Booking is
> > planned to be "very simple" - by emails sent out to the customers. And
> > that's where my trouble starts.
> For security reason the recipient gets encrypted per default:
> see at install
> $GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']=1
> and
> $GLOBALS['TYPO3_CONF_VARS']['FE']['strictFormmail']=1.
>
> So to set the value dynamically your should change that to
> $GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']=0
> AND KEEP the value for
> $GLOBALS['TYPO3_CONF_VARS']['FE']['strictFormmail']=1 and set
> $conf['anmeldungForm.']['recipient']=$GLOBALS['TSFE']->codeString($row_semi
>nar["email"]);

Thanks, that definitely pointed me into the right direction. Though I assume 
the meaning of secureFormmail is a little different:
If you set secureFormmail no recipient-field is inserted. Setting 
secureFormmail=0 allows encrypted recipient-fields to be inserted. As a 
matter of fact all recipients seem to get encrypted automatically. If you 
leave secureFormmail=1 typo3 seems to check for content-element mailforms and 
according recipients (but that's just a quick guess).

Setting locally doesn't help as typo3 needs the same settings for sending the 
mail (which it does from index.php -> tslib/class.tslib_fe.php). So I set the 
values in my global config:
$TYPO3_CONF_VARS['FE']['secureFormmail'] = 0;
$TYPO3_CONF_VARS['FE']['strictFormmail'] = 1;
Afterwards I set in my extension:
$conf['anmeldungForm.']['recipient'] = $row_seminar["email"];

et voila... recipients get encrypted and encrypted accordingly. Mail is sent.

Thanks for pointing me into the right direction Peter.

Kind regards,
Michael




More information about the TYPO3-dev mailing list