Hi,
I urgently need help here.
Currently, I am developing an email system similar to the Yahoo! email system.
I managed to send email using this code:
<?php
function send_email($to_addr,$cc_addr,$bcc_addr,$subject,$m
essage)
{
//input variables
$from_addr = “blah@yahoo.com”;
$headers = "MIME-Version: 1.0\r
";
$headers .= "Content-type: text/html; charset=iso-8859-1\r
";
$headers .= "Cc: $cc_addr\r
";
$headers .= "Bcc: $bcc_addr\r
";
$path_to_sendmail = “/usr/sbin/sendmail”;
$fp = popen(“$path_to_sendmail -Am -t”, “w”);
$num = fputs($fp, "From: $from_addr
");
$num = fputs($fp, "To: $to_addr
");
$num += fputs($fp, "Subject: $subject
");
$num += fputs($fp, "$headers
");
$num += fputs($fp, "$message
");
pclose($fp);
//return infomation
if ($num > 0) { echo “Your mail has been sent out!”; }
else {Sorry there was a problem to send email!"; }?>
My challenge now is to attach doc and pdf files and send them together with the email message.
I observed the Yahoo! email system and see how users can attach files. Basically the attach file button, the browse for file buttons (multiple attachments) and then done button when the file has been successfully attached.
I need help on how to perform these very similar processes that eventually attach the files to the email message and send them to the recipients.
- How do I create the browse for file feature
- How do I attach multiple files
- How do I know the size of the files
- How do I remove the files
5 How do I eventually send the files with the email message
Pardon me for my limited knowledge for php. :bawling:
I am very new to php and I hope to get some guidance here.
Thank you for reading!
Have a Merry Christmas!
Regards,
Junk
:eek2: