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/

--------------Solutions-------------

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

Category:php Time:2010-07-02 Views:2
Tags: php email

Related post

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.464 (s). 13 q(s)