SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict dtracker's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Canada
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Cold Fusion Guru's HELP ME!

    Hi guyz,

    I have problem attaching files to my form. I used the <cfmailparam tag but doesn't seems to work. What Im suppose to put in the "file-name"? I want people to attach multiple images to this form. Here is the dor, feel free to test: www.ferlama.com/order

    And here is the code:
    <cfmail
    from="order@ferlama.com"
    to="order@ferlama.com"
    subject="new ship order"
    server="63.119.175.39">

    #form.yourname#
    #form.street#
    #form.zip#
    #form.city#
    #form.state#
    #form.country#
    #form.area#
    #form.number#
    #form.email#
    #form.ship#
    #form.browse#
    #form.info#

    <cfmailparam
    file = "file-name" >


    </cfmail>
    <cflocation url="http://www.ferlama.com/confirm/">
    Peace - Paz - Paix

  2. #2
    SitePoint Zealot easyrew's Avatar
    Join Date
    Nov 2001
    Location
    Milton Keynes, UK
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before you can attach the file to an email you must take the data provided in the form and save it to a local file on your server.

    Try this example from the Macromedia website:
    http://www.macromedia.com/desdev/tip/003.html

    Or take a look at the CF Documentation here (provided by Evolt.org):
    http://members.evolt.org/help/cfdocs...3.html#1096159

    I don't have time to provide the code for you at present - but if you get stuck after looking at the above examples, let us know.

    Rich
    If a man stands alone in the forest
    and there's no woman around to hear him,
    is he still wrong?
    w: www.EasyRew.com

  3. #3
    SitePoint Addict dtracker's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Canada
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you dude, I tried the tutorial but I don't really understand, let me explain. Do I need to put the Cf code in tha html page or in a new file? The thing is thta I have a form, I want the form results and the attached files mailed to me. I have created a cf file that my form is fetching using the Post mehtod. This file goes like this:
    <cfmail
    from="order@ferlama.com"
    to="order@ferlama.com"
    subject="new ship order"
    server="**.***.***.***">

    #form.yourname#
    #form.street#
    #form.zip#
    #form.city#
    #form.state#
    #form.country#
    #form.area#
    #form.number#
    #form.email#
    #form.ship#
    #form.browse#
    #form.info#

    <cfmailparam
    file = "browse" >


    </cfmail>
    <cflocation url="http://www.ferlama.com/confirm/">


    Well as you can see im really a newbie with Cf, but I really need to get this form working as soon as possible. Please help me!

    Thank You

    FEEL FREE TO TEST
    Last edited by creole; May 15, 2002 at 11:27.
    Peace - Paz - Paix

  4. #4
    SitePoint Addict dtracker's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Canada
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the site:
    www.ferlama.com/website/order
    Peace - Paz - Paix

  5. #5
    SitePoint Zealot easyrew's Avatar
    Join Date
    Nov 2001
    Location
    Milton Keynes, UK
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You would need two files. One will be HTML and contains the form. The other is CFML and will contain the code to save the file and send the email.

    form.htm:
    contains the <form> tags, etc

    dostuff.cfm:
    receives the file through the form
    saves the file(s) to the server
    sends the email with attachment(s)

    Rich
    If a man stands alone in the forest
    and there's no woman around to hear him,
    is he still wrong?
    w: www.EasyRew.com

  6. #6
    SitePoint Guru nagrom's Avatar
    Join Date
    Jul 2001
    Location
    Western CT, USA
    Posts
    803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dtracker...do us a favor and edit out your mail server's ip from the cfmail tag in your post, above.

    a little unsecure, no?

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •