Re: Email Attachment

From: Date: Sun, 04 Feb 2001 02:40:39 +0000
Subject: Re: Email Attachment
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38055@lists.php.net to get a copy of this message
> I know how to send a standard email, but I`m having a bit of trouble adding > an attachment, can anyone put me right? > > this is my code which works fine... > > $subject="Hi"; > $email="test@mydomain.com"; > $from="me@mydomain.com"; > $message="Hi this is me testing my PHP mail script"; > > mail($email, $subject, $message, $from); Email attachments are quite a bit more convoluted than just adding a From header... You may want to use Manuel Lemos email class or some other pre-written user-contributed function to do it. Otherwise, you get the joy of figuring out MIME-encoding and making up unique boundary lines to segment the mime-parts and other gnarly stuff I've managed to not have to figure out... Even if you want to roll your own, read their source as well as the RFCs they used to figure all this out. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#38055) next »