By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,215 Members | 1,191 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,215 IT Pros & Developers. It's quick & easy.

attach file

P: n/a
Ken
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
email.

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!

Ken
Jun 2 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ken wrote:
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
email.

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!

Ken


look at phpmailer - I believe it has this functionality - though I have
not used it...
Jun 2 '08 #2

P: n/a
Ken
Michael,
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?

Ken

"Michael Austin" <ma*****@firstdbasource.comwrote in message
news:ZA*****************@newssvr27.news.prodigy.ne t...
Ken wrote:
>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
email.

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!

Ken


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

Jun 2 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.