[TYPO3] Powermail - attach file to email sent as confirmation

Brian Bendtsen bb at bellevuevej.dk
Mon Jun 16 19:53:21 CEST 2008


Hi

I need to modify powermail, so its possible to attach a file to the mail 
sent to the user, based on a selection in the form.

I imagine I need to use the hook PM_SubmitEmailHook but how, im not 
sure. I found something like this in a forum post:

$this->sessiondata['FILE'][] = 'fileadmin/myfile.txt';

In my extension it looks like this:

function 
PM_SubmitEmailHook($subpart,$maildata,$sessiondata,$markerArray,$obj)	{
  if($markerArray['###uid12###'] == 'email') {
  $this->sessiondata['FILE'][] = 'fileadmin/templates/sponsorer/maersk.gif';
	}
}

but the file is not attached.

I could use some help. Am I at least going in the right direction?

/Brian


More information about the TYPO3-english mailing list