RE: [PEAR-DEV] correction in Mail/mime.php
| From: | cox at idecnet dot com | Date: | Fri, 14 Sep 2001 11:42:24 +0000 |
| Subject: | RE: [PEAR-DEV] correction in Mail/mime.php | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-1914@lists.php.net to get a copy of this message | ||
> > mymail->addHTMLImage('/newsletter/images/prettypicture.gif','i
> > mage/gif');
>
> This function should really be changed to accept image data instead of
> just a filename. This way if the image doesn't exist on disk, (eg.
> sourced from a db) it can still be attached. The same also applies to
> addAttachment().
addAttachment() isn't affected by that.
> > preg_match("([/]([^/]*)$)",$file_name, $file_name_no_path); //
> Added
> > by Robin Vervoorn - Auxilium Software Development
>
> Wouldn't basename() be simpler?
Yeah, if you see addAttacment:
$this->parts[] = array( 'body' => $file,
'name' => basename($file_name),
'c_type' => $c_type ):
I forgot to add it to addHTMLImage. I'll change it if Richard don't do it first.
Tomas
V.V.Cox
------------------
Idecnet Correo-Web