[TYPO3-UG Dutch] Mail versturen met attachment

Rens Admiraal typo3 at ambitiondesign.nl
Tue Jul 17 09:44:08 CEST 2007


Hi all,

Ik probeer een mail te versturen met een attachment, mmet  
t3lib_htmlmail.
Dit wil alleen niet lukken. Zodra ik een attachment toevoeg gaat het  
fout, en komen alle headers van het mailtje in de mail zelf te staan.  
Zonder attachment werkt alles echter goed...
Heeft iemand een idee wat hier fout aan is?

			$mail = t3lib_div::makeInstance('t3lib_htmlmail');
			$mail->start();
			$mail->useBase64();
			$mail->charset = 'iso-8859-1';
			$mail->plain_text_header = "Content-Type: text/plain;  
charset=iso-8859-1\nContent-Transfer-Encoding: quoted-printable";
			$mail->subject = $subject;
			$mail->from_email = $from_email;
			$mail->from_name = $from_name;
			$mail->organisation = $mail->from_name;
			$mail->replyto_email = $mail->from_email;
			$mail->replyto_name = $mail->from_name;
			$mail->mailer = $mailer;
			
				// Evt. attachments toevoegen
			foreach ($attachments as $file) {
				if (is_file($file)) $mail->addAttachment($file);
			}
			
			$mail->setRecipient($this->form['toaddress']);
			$mail->setPlain($body);
			$mail->setContent();
			$mail->setHeaders();


More information about the TYPO3-UG-dutch mailing list