Re: Attachements
| From: | Manuel Lemos | Date: | Sat, 24 Aug 2002 17:31:33 +0000 |
| Subject: | Re: Attachements | ||
| References: | 1 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-113955@lists.php.net to get a copy of this message | ||
Hello,
On 08/24/2002 04:05 AM, Oliver Witt wrote:
Can you attach files to emails and send them through a php script? If so, how?It is not hard but it is not trivial. You need to use multipart/mixed MIME formatted messages. You may want ti try this MIME composing and sending class that lets you compose messages with multiple attached files that may be generated programmatically or read from real disk files. It lets you also compose HTML messages with image files embeded in the message using multipart/related message parts. You may also use multipart/alternative messages to provide text and HTML versions of the message in the same body. The same class can be used to send messages with the mail() function or directly using sendmail or qmail or even sending to a relay SMTP server or directly to the recipient SMTP server for the fastest delivery possible. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos