开发者

Creating a PHP script that emails a file to the user

I'm planning to write a PHP script where a user goes to a particular page, clicks on a link, and a form comes up asking for the user's email to send the file to. After the user selects send to file is sent to their Gmail, Yahoo, Hotmail, whichever开发者_开发知识库. After a successful send, an email is sent to me notifying me of the action.

So far I've come across the following scripts that could make the task much easier:

  1. http://phpmailer.worxware.com/index.php?pg=phpmailerfe

  2. http://planetozh.com/blog/my-projects/php-send-file-by-email-sendmail-attachment/


I'd recommend PHPMailer, though I'm biased as I'm a maintainer. There are plenty of others though - SwiftMailer, Zend_Mail, eZ components, Alexandria and more. Swiftmailer is very elegant, Zend has great integration with the rest of their framework, eZc is fantastic if you need complicated MIME structures (e.g. for iCal, nested attachments etc), Alexandria has async sending (as does PHPMailer in svn right now).


You could take a look at PEAR Packages, like Mail_Mime

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜