Re: sending big email attachments
| From: | Ignacio Vazquez-Abrams | Date: | Fri, 17 Nov 2000 21:23:45 +0000 |
| Subject: | Re: sending big email attachments | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25962@lists.php.net to get a copy of this message | ||
On Fri, 17 Nov 2000, Juan Luis Baptiste wrote:
> >
> > Try this:
> >
> > <?php
> > $boundary="---".md5(rand());
> >
> > $headers="MIME-Version: 1.0\n";
> > $headers.="Content-Type: MULTIPART/MIXED; BOUNDARY=\"$boundary\"\n";
> >
> > $message=" This message is in MIME format. The first part should";
> > $message.=" be readable text,\n while the remaining parts are";
> > $message.=" likely unreadable without MIME-aware tools.\n Send mail";
> > $message.=" to mime@docserver.cac.washington.edu for more info.\n\n";
> > $message.=$boundary+"\nContent-Type: TEXT/PLAIN\n";
> > $message.=$body."\n\n"+$boundary+"\nContent-Type:
> > ".$mimetype."\n";
> > $message.="Content-Transfer-Encoding: BASE64\n";
> > $message.="Content-Description: \"Mail Attachment\"\n";
> > $message.="Content-Disposition: attachment;
> > filename=\"$filename\"\n\n"
> > $message.=base64_encode($content);
> >
> > mail($to, $subject, $message, $headers);
> > ?>
>
> Thanks, but the problem is not with the attachment, the class works fine,
> Ican send the attachments without problems, the problem is that sometimes the
> script that sends the mails timeouts while sending the emails because of the
> size of the attachment (650k). How can I solve this? or what command line
> program can I use to send the mails with attachments so I can make a little
> shell script to send them?
>
Oh, I see. Use set_time_limit().
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>