473,394 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

attach file

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
2 1925
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: tabonni | last post by:
Hi I try to grab the checked files from HTML page and then send those PDF files as attachments. It can just send email, there are no PDF files attached. Can anybody point out my error? My...
1
by: RickL | last post by:
How do you attach a file to a hyperlink so that it cab be opened when clicked? I am new to .net and web development and I need to attach a file to an asp page so that when click it can be opened it...
5
by: erez | last post by:
Hello How can i attach an html file to TableRow in HtmlTable control that run at server, the code should be in server side. thanks
7
by: Greg P | last post by:
I know this is a long post, please bear with me. I have been working on this all weekend to no avail although I have done a good amount of research (see most pertinent links that I've looked at...
6
by: a | last post by:
What is the best way to construct an email in python and also attach a html file the html file to be attached is not on disk, but should be dynamically constructed in the python script I want...
3
by: mse07 | last post by:
hi for every one i have program using to send e-mail but i want to attach text file with that e-mail . how attach text file with e-mail automatically ? example : every time send...
0
by: Lexxzy | last post by:
Hi to all, I've a problem about to attach a recovered database file in the enterprise manager. My problem goes this way, I want to attach a recovered database file. So when I followed this...
7
by: RRsonawane11 | last post by:
Hello, Can anyone know how to write asp code to attach one file and email it to a specified email address. The attach file is the client choose from their Local Harddisk, just like we ...
14
by: sreemathy2000 | last post by:
My requirement is to generate and attach a file and send in an email automatically. i have a existing functionality where i using the code below to write a CSV file in my local system. ...
9
by: dpatel75 | last post by:
I am trying to copy a database from a SQL 2000 SP3 Windows 2000 server to a 2005 SP2 Windows 2003 server. I am trying to use detach and attach method (have tried both within Management Studio and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.