Welcome Guest, Not a member yet? Register   Sign In
Email class - missing Content-ID header
#1

[eluser]airween[/eluser]
Hello developers,

I have sent some email with CI Email class, there were html emails with plain text part, and inline attachments - and nothing else.
When CI made the email, it didn't set the "Content-ID" MIME header (according to rfc 2045: http://www.ietf.org/rfc/rfc2045.txt, section 7).

Looks like couldn't insert that with extending the class, I just patched the original source (I didn't find any instruction about how could I send patch), here is it:
Code:
diff -crB  _Email.php.ORIG Email.php
*** _Email.php.ORIG     2009-03-19 21:34:15.000000000 +0100
--- Email.php   2009-03-19 21:38:01.000000000 +0100
***************
*** 1123,1128 ****
--- 1123,1132 ----
                        $h .= "name=\"".$basename."\"".$this->newline;
                        $h .= "Content-Disposition: ".$this->_attach_disp[$i].";".$this->newline;
                        $h .= "Content-Transfer-Encoding: base64".$this->newline;
+                       if ($this->_attach_disp[$i] === "inline")
+                       {
+                               $h .= "Content-ID: <".$basename.">".$this->newline;
+                       }
  
                        $attachment[$z++] = $h;
                        $file = filesize($filename) +1;

Hope this help.


regards:
airween


Messages In This Thread
Email class - missing Content-ID header - by El Forum - 03-19-2009, 03:20 PM
Email class - missing Content-ID header - by El Forum - 03-20-2009, 11:35 AM
Email class - missing Content-ID header - by El Forum - 03-22-2009, 02:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB