Matt Arnilo S. Baluyos (Mailing Lists) kirjoitti:
What's the easiest way to go about this? Specifically, what's the easiest way to read a file from the server and send it as an email attachment.
I would suggest you to use http://phpmailer.sourceforge.net/ that is a featured class for sending e-mails from PHP scripts. It supports file attachments too. Messages can be sent over sendmail or direct SMTP with the PHPMailer.
(Untested) example: require_once "class.phpmailer.php"; $mailer = new PHPMailer(); $mailer->AddAttachment("/tmp/myattachment.pdf","Attachment.pdf","base64","application/pdf"); $mailer->AddAddress("ville@xxxxxx"); $mailer->Subject = "PDF Attachment"; $mailer->Body = "This is a message with PDF attachment."; $mailer->Send(); Ville -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php