[PHP] Attachments with Mail()
Hi 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); Thanks Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.529 / Virus Database: 324 - Release Date: 16/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachments with Mail()
PEAR has a class which may be helpful. http://pear.php.net/package/Mail_Mime On Thursday 23 October 2003 04:13 am, Don Mc Nair wrote: Hi 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); Thanks Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.529 / Virus Database: 324 - Release Date: 16/10/2003 -- Evan Nemerson [EMAIL PROTECTED] -- A leader is the wave pushed ahead by the ship. -Leo Nikolaevich Tolstoy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachments with mail() function
I recommend sending yourself a mail with an attachment and check the sourcecode of the received mail... together with base64encode() you should be able to do the job... Edward - Original Message - From: Rafael Perazzo B Mota [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 3:11 AM Subject: [PHP] Attachments with mail() function How can I send a simple file as attachment using the mail function ? Can anyone give me a simple example ? Thanks Rafael Perazzo _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Attachments with mail() function
Class to send a file as an attachment with the php mail() function. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1583 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Rafael Perazzo B Mota [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 4:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Attachments with mail() function How can I send a simple file as attachment using the mail function ? Can anyone give me a simple example ? Thanks Rafael Perazzo _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] attachments in mail
How can i include a file as an attachment in an email? I'm looking for something like this... mail($to_email,%subject,$content,$attached_file); Thanks in advance! Dan +---+ | | | If Yoda so strong in force is, | | why words in proper order he cannot put? | | | +---+ | | +---+ | Daniel J. Cleveland | | e-mail: [EMAIL PROTECTED]| +---+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] attachments with mail() function
Thank you Michael. I will look for mime_mail classes. "Michael Hall" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm not sure about including them in the mail function as such, but it can certainly be done using one of several mime_mail classes that are around. I don't have one handy right now but you can find them by searching the php archives and/or the annotated php manual. I know the one by Schumann and Ratschiller works OK. Mick On Sun, 25 Mar 2001, BlackLord wrote: Is there anyway to include attachments in mail() function? If you give a small example, it will be great. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] attachments with mail() function
Is there anyway to include attachments in mail() function? If you give a small example, it will be great. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]