Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email .doc as text

Status
Not open for further replies.

Wes98765

Programmer
Jul 31, 2002
135
US
I want to allow a user to upload a .doc or .rtf ect. and send an email that will include the text in the .doc file into the body of the email. I am using <cfmail>


Thanks

Wes
 
Wes98765, hi you seem to be doing a quite a few things here, let me see if I get it right.

You want the user to:
1) upload a file (.doc or .rtf or etc)
2) send an email that will take the text from the same .doc or .rtf file they are uploading into the body of the text??

Why have the user upload the file if the body has the text in it?? If you want to simply have the user upload the file, then a <cffile> works great in conjuction with a <cfmail>


____________________________________
Just Imagine.
 
The client has a number of text documents and they want to be able to upload them and have the text go into the email instead of showing up as an attachment.
 
If you need to just read the file, then just use CFFILE to read it into a variable and then dump it into the CFMAIL. If you are sure you need to upload , then 1.) upload the file with CFFILE, then 2.) read the file into a variable with CFFILE, and 3.) dump the file contents into a CFMAIL. Then if you need to 4.) delete the file with CFFILE.

But that's a lot of work and is probably not what you really need to do. Think some more.
 
One other thing to consider: Word and rich-text have formatting that some mail clients can't or won't handle (capability or user preference). How would you strip all of the specialized formatting code and leave just the text?

Phil Hegedusich
Senior Web Developer
IIMAK
-----------
Boy howdy, my Liberal Studies degree really prepared me for this....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top