[FX.php List] Email attachments in PHP
Alex Gates
alex at gandrpublishing.com
Wed May 28 13:29:35 MDT 2008
Hi Bob -
I've never done this - and I have limited experience with fopen(), but
I'd look into this route:
Create the text file
http://us.php.net/manual/en/function.fopen.php
<?php
$fp = fopen('path/to/data.txt', 'x+');
fwrite($fp, 'here is the text for your file');
fclose($fp);
?>
Then attach and send using swift mailer
http://www.swiftmailer.org/wikidocs/v3/tutorials/attachments
Bob Patin wrote:
> I've got a client for whom I need to generate a small text file, attach
> it to an email, and send it, all from within PHP.
>
> Is this doable, and if so, how would I go about it? the text file would
> be very tiny, and the content of it would be generated in PHP code.
>
> Thanks for any guidance,
>
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> FileMaker 9 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
>
> CONTACT US VIA INSTANT MESSAGING:
> AIM or iChat: longterm1954
> Yahoo: longterm_solutions
> MSN: tech at longtermsolutions.com
> ICQ: 159333060
>
> --------------------------
> Contact us for FileMaker hosting and programming for all versions of
> FileMaker
> PHP • CDML • Full email services • Free DNS hosting • Colocation •
> Consulting
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list