Re: sending mail with pdf attachment
| From: | Merlin | Date: | Thu, 17 Apr 2003 15:25:47 +0000 |
| Subject: | Re: sending mail with pdf attachment | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144300@lists.php.net to get a copy of this message | ||
Hello Peter,
I tryed the example in pear. Unfortunatelly one file seems missing.
mime.php:
SARATOGA:~ # ls /usr/local/lib/php/Mail/
RFC822.php sendmail.php smtp.php
Do I have to install a new version of pear? I remember that I have
previously send jpg images simply with php mail(), but cant find the code
anymore. Do I really need pear, and if so, do I have to upgrade? I am
running php 4.2.1
cheers,
merlin
"Peter Pistorius" <peterp@podbox.co.za> schrieb im Newsbeitrag
news:20030417145406.91299.qmail@pb1.pair.com...
> Normally you would have to write some sort of MIME message parser that
would
> encode the attachment in to your message but PEAR (Yeah!) has made this
> wonderfully easy for us:
>
> http://pear.sourceforge.net/manual/core.mail.mime.php
>
> addAttachment()
> Adds an attachment to the email. It takes five arguments:
>
>
>
> a.. $file - Either a filename or the actual file data itself.
>
> b.. $c_type - Content type of the file. Defaults to
> application/octet-stream if not given.
>
> c.. $name - The filename of the file. Defaults to blank if not given.
>
> d.. $isfilename - Whether the $file argument is a filename or not. If
> true, the file will be read in Defaults to true if not given.
>
> e.. $encoding - Type of transfer encoding to use for the file data.
> Defaults to base64 if not given. for text based files (eg. scripts/html
etc)
> this could be given as quoted-printable.
>
>
>
> Regards,
> Peter "Pod" Pistorius
> (Poor, unemployed, student in South Africa)
>
> peterp@podbox.co.za
>
>
>