[TYPO3-dev] Need help with a new extension (ste_invoice)

Steffen Kamper steffen at sk-typo3.de
Fri Nov 23 17:52:00 CET 2007


"Sacha Ligthert" <sacha at ligthert.net> schrieb im Newsbeitrag 
news:mailman.1942.1195836179.14020.typo3-dev at lists.netfielders.de...

> By any chance, do you know any extension that allows sending attachments 
> with the emails?
>
> Greetings,
>
> Sacha Ligthert

i don't know, but it should be no problem. I did mails with attachments, and 
the principe is not hard to get

here is a snippet i used in a non-TYPO3-project, but it's easy to migrate

         $header.= "MIME-version: 1.0\n";
         $header.= "Content-type: multipart/mixed; ";
         $header.= "boundary=\"Message-Boundary\"\n";
         $header.= "Content-transfer-encoding: 7BIT\n";
         $header.= "X-attachments: $file_name";
         $body_top = "--Message-Boundary\n";
         $body_top.= "Content-type: text/html; charset=utf-8\n";
         $body_top.= "Content-transfer-encoding: 7BIT\n";
         $body_top.= "Content-description: Mail message body\n\n";
         $msg_body = $body_top . $msg_body;
         $msg_body.= "\n\n--Message-Boundary\n";
         $msg_body.= "Content-type: $file_type; name=\"$file\"\n";
         $msg_body.= "Content-Transfer-Encoding: BASE64\n";
         $msg_body.= "Content-disposition: attachment; 
filename=\"$file\"\n\n";
         $msg_body.= "$encoded_file\n";
         $msg_body.= "--Message-Boundary--\n";

vg  Steffen 






More information about the TYPO3-dev mailing list