[TYPO3-project-formidable] Userobj for template subpart in Mail Actionlet

Jérémy Lecour jeremy.lecour at gmail.com
Tue Jun 19 15:38:14 CEST 2007


I reply to myself and add some other enhancements :- use8bit : sends the
message in 8 bits mode or not
- useBase64 : idem for the Base64 encoding
- forcecharset : possibility to change the charset for the mail, usefull to
send it in UTF-8

The previous patch is included here too.


--- class.tx_actmail.save.php 2007-06-19 10:44:23.000000000 +0200
+++ class.tx_actmail.php 2007-06-19 15:33:40.000000000 +0200
@@ -90,7 +90,10 @@
  else
  { $template_path =
t3lib_div::getFileAbsFileName($this->oForm->_navConf("/template/path/",
$aConf));}

- $form_subpart = $this->oForm->_navConf("/template/subparts/form/",
$aConf);
+ if($this->oForm->_navConf("/template/subparts/form/userobj/", $aConf) !==
FALSE)
+ { $form_subpart =
$this->oForm->_callUserObj($this->oForm->_navConf("/template/subparts/form/",
$aConf));}
+ else
+ { $form_subpart = $this->oForm->_navConf("/template/subparts/form/",
$aConf);}

  $sMail = $this->_parseTemplate($template_path, $form_subpart,
$aHRData["labels"], $aHRData["values"]);
  }
@@ -99,6 +102,15 @@

  $isHtml = ($this->oForm->_isTrue("/html/", $aConf));

+ $use8bit = ($this->oForm->_isTrue("/use8bit/", $aConf));
+
+ $useBase64 = ($this->oForm->_isTrue("/useBase64/", $aConf));
+
+ if($this->oForm->_navConf("/forcecharset/userobj/", $aConf) !== false)
+ { $forcecharset =
$this->oForm->_callUserObj($this->oForm->_navConf("/forcecharset/",
$aConf));}
+ else
+ { $forcecharset = $this->oForm->_navConf("/forcecharset/", $aConf); }
+
  $subject = $this->oForm->_getLLLabel($this->oForm->_navConf("/subject/",
$aConf));

  if($this->oForm->_navConf("/subject/userobj/", $aConf) !== FALSE)
@@ -130,7 +142,9 @@

  $oMail = t3lib_div::makeInstance('t3lib_htmlmail');
  $oMail->start();
- $oMail->useBase64();
+ if ( $useBase64 ) $oMail->useBase64();
+ if ( $use8bit ) $oMail->use8bit();
+ if ( $forcecharset ) $oMail->charset = $forcecharset;

  $oMail->subject = $subject;
  $oMail->from_email = $fromEmail;


More information about the TYPO3-project-formidable mailing list