Link to home
Start Free TrialLog in
Avatar of denny3d
denny3d

asked on

can attach a dynamic pdf file to a mail?

hello Expert
I use this free class for create a pdf file with php
http://www.ros.co.nz/pdf/

I have a question :
I generate a dynamic pdf file and when i create it i send a mail to ppppp@ppp.com,
but
Can i attach this dynamic pdf file to a mail?

Tks
Avatar of psimation
psimation
Flag of South Africa image

yes, use a proper php mailer class:

http://phpmailer.sourceforge.net
Avatar of denny3d
denny3d

ASKER

ok, for class php mailer, but how i attach my pdf file?
i dont have a phisical pdf file, bu i have a file php that create a temp pdf file.
ASKER CERTIFIED SOLUTION
Avatar of absx
absx
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have done this with fpdf -

First, you generate the PDF file and save it in a temporary directory.
Next, you generate the email message, adding the PDF file as an attachment
You send the message, checking the return code from mail()
Then you unlink the PDF.

Man pages here are helpful:
http://www.zend.com/zend/spotlight/sendmimeemailpart1.php
http://pear.php.net/package/Mail_Mime

HTH, ~Ray