nevermind... found out what was wrong!!
thank you for reading BTW :p

--
##################################
# Yupapa Web Hosting
# Web Site - http://www.yupapa.com
# Email - [EMAIL PROTECTED]
##################################
"Yupapa" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> HiHi~
>
> The problem is about EMAIL.
> I am writing a web-based email for my school project and i have problem
> doing attachments...
>
> I am using MIME:Base64 to encode and use Net::SMTP to send email.
>
> This is the code I use to encode files:
>
> $msg .= 'Content-type: application/octet-stream; name=""'."\n";
> $msg .= "Content-disposition: attachment; filename=\"$filename\";"."\n";
> $msg .= 'Content-transfer-encoding: base64'."\n\n";
> while ($Bytes = read($_,$Buffer,1024)) {
>  $msg .= encode_base64($Buffer)
> }
> close($_);
>
> The code above is just read the file content and attach it to the mail
> message.
> I am not sure that I have to store the files to a temporary directory
first
> and then do the encoding because I found that way slow. (or maybe that's
the
> only way to do attachment) :p
>
> I've tried both methods, but the result of the attachment is corrupted.
:(
>
> Thank you and Bye,
> YUPAPA
> ##################################
> # Yupapa Web Hosting
> # Web Site - http://www.yupapa.com
> # Email - [EMAIL PROTECTED]
> ##################################
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to