NYCPHP Meetup

NYPHP.org

[nycphp-talk] Emailing files from server

Dan Cech dcech at phpwerx.net
Fri Sep 7 19:57:15 EDT 2007


Gary Mort wrote:
> Rick Retzko wrote:
>> Help please with setting up a function to email a specific file from a
>> specific directory located on my server to a customer.
>>  
>> Issue: My customer wants to have an xls file with specific info from
>> their website eMailed to him on demand.  I pulled a script from
>> php.net, but I can't seem to get it to grab the file.  The emailing
>> works, but not the attachment.
>>
> 
> I'm lazy and use HTMLMimeMail:
> http://www.phpguru.org/static/mime.mail.html

I haven't heard of that one, but I've used PHPMailer [1] with great
success, and I hear SwiftMailer is excellent too (and actively
maintained unlike PHPMailer and HTMLMimeMail).

Not only do they build the email and take care of such niceties as
encoding, etc, you also get drop-in SMTP and a host of other goodies.

They're also LGPL licensed libraries, so you can use them in commercial
projects without worries.

Dan

[1] http://phpmailer.sourceforge.net/
[2] http://www.swiftmailer.org/



More information about the talk mailing list