Reply to attachment in mail function

Your name:

Reply:


Posted by nescio on 02/13/06 21:31

hello,

i have to make some csv-files from a database.
then i zip the csv-files (i zip the directory and the files in the
directory)
then i have to sent the zip-files as an attachment with an email.

i found out how to make an zip file on the fly but the problem is: i don't
know how to get it as
an attachment to the email.

i found some sample code but it doesn't work.
the problem is: i don't know what kind of content-type i have to use with a
zip file
i tried something as: Content-Type: application/zip; but this doesn't work.

------------------ source code ---------------------
# Attachment
$msg .= "--".$mime_boundary.$eol;
$msg .= "Content-Type: application/zip; name=\"".$letter."\"".$eol; //
sometimes i have to send MS Word, use 'msword' instead of 'pdf'
$msg .= "Content-Transfer-Encoding: base64".$eol;
$msg .= "Content-Disposition: attachment;
filename=\"".$letter."\"".$eol.$eol; // !! This line needs TWO end of lines
!! IMPORTANT !!
$msg .= $f_contents.$eol.$eol;
# Setup for text OR html
$msg .= "Content-Type: multipart/alternative".$eol;
----------------------------------------------------------

thanks

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация