attach file

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a large text file that is send with mail.

I would like to save the text as a file (*.txt) and then attach it to the

Can I do that with PHP?

How do I save the text $body as a file?

How do I attach (send) it to mail()?

Thanks for the help!


Re: attach file

Ken wrote:
Quoted text here. Click to load it

look at phpmailer - I believe it has this functionality - though I have
not used it...

Re: attach file

I set up PHPMailer.  Great program.
I was able to send an attachment with PHPMailer.

Thanks for the suggestion.

Now the question is:
In PHP, how do I convert a php $body= "  " which includes text + variables
into a .txt or .html file so the saved file has the value of the variables
rather than the $variable?


Quoted text here. Click to load it

Site Timeline