Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default CFMAIL - CFIF

    Anyone have ideas how i could set up a survey form that emails to different
    email addresses depending on what the content of the survey is?

    I'm wanting to use CFML and SQL - i think ...

    Any help is gratefully welcome !!

    Thanks
    JP :D

    junkip Guest

  2. Similar Questions and Discussions

    1. Cfif in CFMAIL
      I am using the following to send an email based on information received through a form.: <cfoutput query="mailattachement"><cfset emailimage =...
    2. Newbie help - CFIF and CFMAIL
      I can't figure out why this is not working. I have a form and once the elements of the form is completed, the info is email to me. Basically the...
    3. <cfmail></cfmail> in a script
      I am wondering if I can put <cfmail> tags and code within a javascript script. will the browser recognize it, and perform the instructions? ...
    4. cfmail - Attribute validation error for tag CFMAIL.
      I'm getting the error ' Attribute validation error for tag CFMAIL.' on the code below. All its doing is outputting a text string to the TO: field. ...
    5. cfif being ignored
      I wanted this to only execute if FORM.rp_image does not = defaultImg.gif but it seems to always run. I thought the syntax was okay but maybe not. ...
  3. #2

    Default Re: CFMAIL - CFIF

    Sure you can.
    You can condition your to:".." attribute within the cfmail tag

    For example

    <cfmail
    from:"myemail@emailcity.com"
    to: <cfif form.subject EQ 1>
    "youremail1@emailcity.com"<cfelse>"Theiremail@emai lcity.com"</cfif>
    subject: "testemail"
    </cfmail>

    hope this helps

    BerkTheTurk Guest

  4. #3

    Default Re: CFMAIL - CFIF

    I don't think you can use a CFIF condition inside the attributes of a CFMAIL
    tag. You could check the condition before sending the email and set a variable
    accordingly:

    <CFIF condition EQ 1><CFSET tostring = "recip1@mysite.com">
    <CFELSE><CFSET tostring = "recip2@mysite.com"></CFIF>
    <CFMAIL TO="#tostring#" FROM="webmastr@dickinson.edu" SUBJECT="Test">

    -Paul

    dempster Guest

  5. #4

    Default Re: CFMAIL - CFIF

    Yeah i think you are right.
    My bad
    :)

    BeRk
    BerkTheTurk Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139