Re: Attachments with Mail()

From: Date: Thu, 23 Oct 2003 20:36:44 +0000
Subject: Re: Attachments with Mail()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167353@lists.php.net to get a copy of this message
Hello, On 10/23/2003 09:13 AM, Don Mc Nair wrote:
Can anyone tell me how to add a file as an attachment to an email sent with something like the following ? $headers = "From: <".$fromaddress.">\r\n"; $headers .= "Reply-To: <$fromaddress>\r\n"; mail($toaddress, $subject, $mailcontent, $headers);
You may want to try this class that lets you add attached files easily either from local files, remote files (http) or data in strings. It can also guess the correct file type from the file name: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/

« previous php.general (#167353) next »