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>
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.