Mail_Mime bogus behavior

From: Date: Mon, 01 Sep 2003 20:20:52 +0000
Subject: Mail_Mime bogus behavior
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20973@lists.php.net to get a copy of this message
Hi. While playing arround with the Mail_mime class I ran across this extrange behavior when sending an HTML email with some image in it. $oMail = new Mail_mime(); $oMail->setFrom('web@caradhras'); $oMail->setHTMLBody('<html><head><title>toCheck</title></head><body><h1>an Image</h1><img src="logop.gif"><br>End</body></html>'); $oMail->addHTMLImage('logop.gif',image_type_to_mime_type(IMAGETYPE_GIF)); $oTransport = new Mail('Mail_smtp',array('host' => 'mail.wol')); $oTransport->send('tite@intranet.wol',$oMail->headers(),$oMail->get()); With this simple straight forward code nither the Content-Type, boundary or Content-Transer-Encoding headers are set on the email recieved. I had to store first the body recieved from get() in order for the headers to build up properly. The point is that I didn't want to use a variable where I could avoid it. Thanks. Tite.

« previous php.pear.dev (#20973) next »