Intrusion via CFMAIL - conditional aid?

Hi - I have a form that a user sends feedback about a product, and it sends an e-mail to three people.

Is it possible to use a certain conditional statement that says that if the product A, B, C and D is selected - send an email to person 1, 2 and 3

AND if the product E is selected - send email to one person 1,2,3 and 4

my code so far looks like this, and the error I get is listed under code thank you!

CFINSERT datasource = "MobWebDataSource" tablename = "mobilityFeedback."
FormFields = "name, e-mail, count, product, description, telephone1, telephone2, phone3, ext, userComments" >

< cfif product = gasTax, RAP, CAPP, FFC >

< intrusion via CFMAIL = "" #email # ""
TO = "q@crab.wa.gov.
CC = ' p@crab.wa.gov.
BCC = "r@crab.wa.gov.
OBJECT = "REPORT of FEEDBACK" SERVER = "crab13" >
< cfoutput >
#name # #county # County introduced a feedback report to the Information Services of CRAB.

Phone:(#phone1#) #phone2 #-#phone3 # #ext ext #.

Product: #product #.

Description: #Description #.

Comments: #userComments #.
< / cfoutput >


< / intrusion via CFMAIL >
< cfelse >

< intrusion via CFMAIL = "" #email # ""
TO = "u@crab.wa.gov, q@crab.wa.gov, p@crab.wa.govr@crab.wa.gov.
OBJECT = 'REPORT FEEDBACK' SERVER = "CRABMX" >
< cfoutput >
#name # #county # County introduced a feedback report to the Information Services of CRAB.

Phone:(#phone1#) #phone2 #-#phone3 # #ext ext #.

Product: #product #.

Description: #Description #.

Comments: #userComments #.
< / cfoutput >
< / intrusion via CFMAIL >

< / cfif >

Invalid CFML construction found on line 85 in column 14.

ColdFusion has been looking at the following:

=

The CFML compiler treated:

  • A cfif tag beginning on line 85, column 2.

85 < cfif product gasTax, RAP, CAPP, FFC = >

rockhiker wrote:

You test the literal string 'product' from the list.  You probably mean testing the value of a variable named product.

I.E.

You can also consider the lilistFindNoCase() function, so that you don't need to worry about the capitalization of the values.

The documentation for the functions of list would help to understand what would be the best choice for you.

http://livedocs.Adobe.com/ColdFusion/8/htmldocs/functions-pt0_13.html

Tags: ColdFusion

Similar Questions

  • Intrusion via CFMail problem

    Anybody out there remember CF5? I have this app that has been in use for about 100 years. We have not changed the pages associated with our comments page lately and yet our intrusion via CFMail Tag started throwing the following error message:

    Quote:
    ... unknown exception condition

    TagCFMail::sendMessage

    The error occurred while processing an element with a general identifier of (intrusion via CFMAIL), occupying document position...
  • How to encrypt messages of intrusion via cfmail in CF 10?

    Hello

    In my view, there is a useful attribute encrypt for intrusion via cfmail in ColdFusion 11. But I have version 10. Is there a work around to encrypt messages via cfmail intrusion?

    Thank you
    Josh

    I did some research on Google and found nothing.  This does not mean that it is not possible or practicable; but there is no native way to do it, as far as I know, in CF10.

    V/r,

    ^_^

  • intrusion via CFMAIL sends only not to external address

    Hello

    I have a new web server that I have tested before turning on live. I ran into a problem of intrusion via cfmail. The server is

    Windows 2008 R2, 64Gig ram, 64-bit, IIS 7.5, Coldfusion 9.0.2 multi server, consolidation of cases CF 2, JDK1.7.0_71

    We had a company CF and harden so it can be linked to the curing, but I'm not sure.

    < intrusion via cfmail doesn't send e-mail to recipients outside our field of work/field. The tag < intrusion via cfmail > 1 below sends the e-mail but the 2nd one does not work. That's what I see when trying to send via the tag < intrusion via cfmail > 2nd external e-mail address field

    -no errors on the page I run in browser

    -l' email is not received at the [email protected] (the syntax is correct)

    -the #2 attempt is displayed in the mail/Undelivr folder

    -mail.log has this error

    "Error","scheduler-3","01/15/15","10:13:27",,"javax.mail.SendFailedException: Invalid addresses;   nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

    -application.log - no error

    -exception.log has the same error in addition to stack trace

    -server.log errors

    Any help is appreciated

    Joe

    "< intrusion via cfmail to ="me @ .comworks"from ="[email protected]"subject ="test"type ="html"> "

    #DateFormat (now (), "mm/dd/yyyy") # #TimeFormat (now (), "Hh") # < br / >

    < / intrusion via cfmail >

    "< intrusion via cfmail to ="me @home.com"from ="[email protected]"subject ="test"type ="html"> "

    #DateFormat (now (), "mm/dd/yyyy") # #TimeFormat (now (), "Hh") # < br / >

    < / intrusion via cfmail >

    Intrusion via CFMAIL is simply a wrapper for the underlying methods of mail Java API, so it shouldn't be any problem with him.

    Looks like that the SMTP server is not registered to send mails. So here's the problem with the SMTP server events, and not with the intrusion via CFMAIL

    HTH

    Thank you

    VJ

  • CFINCLUDE within the intrusion via CFMAIL

    I have a done a CFQUERY user and retrieve email and name.  Then I try to make an intrusion via CFMAIL something like:

    < to = "" #user.email # intrusion via cfmail "from =" " [email protected] "subject =" Message from #sender_name # "type ="html"> "

    < table > < tr > < td >

    Dear #receiver_name #.

    < table > < /tr >

    < tr > < td >

    #form.message #.

    < table > < /tr >

    < /table >

    < / intrusion via cfmail >

    It seems to work with intrusion via CFMAIL and variables are populated correctly.  However, when I put the content in a template content.cfm because I want to use elsewhere as well. So content.cfm has:

    < table > < tr > < td >

    Dear #receiver_name #.

    < table > < /tr >

    < tr > < td >

    #form.message #.

    < table > < /tr >

    < /table >

    and the program has become:

    < to = "" #user.email # intrusion via cfmail "from =" " [email protected] "subject =" Message from #sender_name # "type ="html"> "

    < cfinclue template = "content.cfm" >

    < / intrusion via cfmail >

    Now the problem is, I don't get the variables (#receiver_name # and #form.message #), populated by Coldfusion when using the cfinclue model.  Why?  It drives me crazy.  I don't know why it does not work.    Thanks in advance.

    Your code works in intrusion via cfmail because Coldfusion executes cfoutput implicitly in the intrusion via cfmail tag. The solution is to add the in content.cfm cfoutput tag, as follows:

    Dear #receiver_name #.

    #form.message #.

    Either way, your post is a typo: cfinclue instead of cfinclude. It just is a typo for the road and has nothing to do with the question.

  • intrusion via CFMAIL utf-8

    I use the intrusion via CFMail to send mail. Because the mail contains Spanish, I need email support for utf-8 character set.

    I use following code to display the Spanish characters, but the email shows funny characters.

    I would like to know is there any way to display utf-8 characters for a particular language.

    Your information and help is much appreciated,

    Kind regards

    Iccsi,

    "< FROM =" "#myMail.Frommail # intrusion via CFMAIL" TO = "#MyMail.ToEMail #".
    BCC = "" #MyMail.BccEMail # "SUBJECT ="My subject"charset ="utf - 8 ""
    TYPE = "Plain Text" >


    #MyEmail.EMailMessage #.

    < / intrusion via CFMAIL >

    I use the following code, then it works,

    Thanks for the help and information,

    Iccsi,

  • Intrusion via CFMail

    I would use intrusion via CFMail to send e-mail.

    Intrusion via CFMail must mail SMTP server to install or ColdFusion mail server?

    Information and help Yuor is great appreciated,

    Kind regards

    Iccsi,

    No, ColdFusion doesn't have an e-mail server. Just as you must provide the database server yourself, so, too, the case with the mail server.

    What ColdFusion needs to know for purposes of configuration are the domain name or address IP of your e-mail server, the user name and password. You must enter information in the mail page in the ColdFusion administrator. Once the mail server is configured, you can re-use intrusion via cfmail to send mail.

    You can configure ColdFusion to use an existing Google mail e-mail server. However, if you want to have your own mail server, I recommend hMailServer (for Windows). It of free and is well documented.

  • issue of intrusion via CFMAIL authentication mod...

    Ok. I have a site of cf for a long time... Appears as in the old days, you could use little intrusion via cfmail tag with params as...

    < intrusion via cfmail to = "xxx".

    from = "xx".

    object = "xxx".

    Server = "xxx" >

    test

    < / intrusion via cfmail >

    but when you're working on a new mod site - NOW, it seems I need authentication more - with user and Pass as:

    Server = "xxx" username = "xxx" password = "xxx" >

    More information: in reality the MX mail is NOW on another server on the site of CF - then maybe this could lead to the necessary changes?

    Q: is it true?

    It really depends on your mail server.  Are they using the same email on its new server software as they did when he was on the same square as ColdFusion?  In addition, if you put the servername, username information and password in CF administrator, you shouldn't include in your tags.

    -Carl V.

  • intrusion via CFMAIL and JavaMail

    Hi all

    My applicatoin must send notifications by e-mail with registration included my clients codes. So they can sign up for an account using this code to verify that owns it email addresses. In my local machine, I try to implement the functionality of e-mail. I encountered some problems, however. 5 hours left for a such beautify Saturday. I'm tired alittle. So I come here for help again. Greatly appreciated for any help. Here are two of my questions.

    1. intrusion via cfmail does not work in the developer edition?

    Of course, intrusion via cfmail tag is the easiest way to do it by e-mail. In the Administrator page, I entered 'smtp.gmail.com' (without the quotes) as the mail server and my gmail username and the password as authentication. So I try of intrusion via cfmail tag in ColdFusion page. It does not work, or it displays an error message. In addition, in the Administrator page I'm not able to "Verify the connection to the mail server" is checked. If I check and click on the button 'Submit changes', the remains of the disabled check box and the check box I put them disappear. I suspect that intrusion via cfmail tag does not work in the edition developer, right?

    2. second question: I went to come and try to write a program myself using JavaMail. I've done it before in a Java project. So it did not take me long to reuse before code. After having fully tested, I moved the C:\ColdFusion9\wwwroot\WEB-inf\classes Java class files. So I called this Java class in a ColdFusion page, the system gave me this error message below. I tried to find me the solution. But it turns out to be much more complited I thought. Someone suggests deleting activation.jar file in the C:\ColdFusion9\lib folder. But if I do that, my java program would not work. I know that the below error is caused by the version of the different class loader. But I don't know where and how reach to tweak it. Anyone has any experience in this or problems before? Many many thanks!

    Error casting an object of type com Sun.mail.Handlers.text_plain cannot be cast to javax.activation.DataContentHandler by an incompatible type. This usually indicates an error in programming in Java, although it could also mean that you tried to use a foreign object in a different way, it has designed.

    com Sun.mail.Handlers.text_plain cannot be cast to javax.activation.DataContentHandler

    I know where goes wrong. It has nothing to do with the mail server, user name and password fileds. These fields are filled in correctly. The problem is linked to the number of port and SSL and TLS. First port 25 does not work for smtp.gmail.com. If you set only port 25 on the Administrator page, the page will finish succesffully, but mail will not in your Inbox. Instead I need to specify the two active port 465 and SSL, or the two number of ticked off port 587 and TLS. I can't specify port 465 in the Administrator page and enable SSl on the ColdFusion page. It will not work. I never see this kind of thing. Why do I have to specify in one place or another. FC is not smart enough to understand.

  • intrusion via CFMAIL message queue once, twice sending

    Hello

    For the last few weeks, one of my CF cases began to send outgoing emails twice.  Over the past years, pages have sent only one copy, but now they send 2 copies of each message.  A second instance that runs the same page (from a different domain) send a copy of each message.

    Even a simple, hard-coded tag < intrusion via cfmail >, with nothing else on the page whatsoever, is send twice.

    I have confirmed through newspapers and tests which

    -the intrusion via cfmail tag runs only once

    -1 single physical message is added to the folder/Spool / / Mail

    -2 identical messages are saved in the mailsent.log

    -2 emails are delivered

    I have confirmation that the outgoing mail server receives 2 commands to send each message

    As mentioned, the same page running on the outcome of the proceeding of 1 to 2 messages and run on the outcome of the proceeding of 2 in 2 posts.

    I got confirmation that 2 copies of the trial are not running at the same time.

    No sense at all?

    Any help would be greatly appreciated

    Looks to me that you have two instances of JRun running (somehow), and both are running a watchman of mail on the same dir of spooler.  Or something like that.

    You have an additional jrun process running?

    --

    Adam

  • Problem of object strange intrusion via cfmail

    Now later in my adventures of coldfusion!

    I have a variable field that I put in my subject line of the email:

    < cfset objet_message = ' apply for leave has been deleted by #User_Name #-FYI only "/ >

    < intrusion via cfmail

    to =[email protected]

    object = "" # objet_message # "type ="html">"

    Dumping User_Name watch what it is: 'Bob Marley', with only 1 space between the first and last name.

    Dumping the objet_message filed prior to sending the email says: "Leave request deleted by Bob Marley - FYI Only"

    However, when the mail arrives, 17 additional seats have been added between the names!

    "Leave request removed by Bob Marley - FYI only"

    I even tried Trim without result.  And the type = "text", "plain" and simply omitted, make no difference in the subject line.

    Any suggestions?

    Do what Adam has suggested.  Put the output of the var between a pair of delimiters such as [] so that you can visually see what is in the var.  Try out its length as well, just in case there are all nonprinting characters in it - the length is what you see visually on the screen?  Also try to view this result by VIEW SOURCE.  Finally, what happens if you include the content of the var even in the body of the email?  As someone has pointed out, the SUBJECT line is not HTML formatted.

    -reed

  • Intrusion via CFMAIL - sending of any email address?

    I am very familiar with the intrusion via cfmail tag and how it works, but I'm still a little unsure about sending an email to any address of e-mail (without the references to server connection). To clarify, I want to send an email FROM an email address is entered by a person who submits my form.
    I know that this is possible by using:

    < from = "intrusion via cfmail form.email" = "[email database]"... "

    Are there problems by sending an e-mail to the e-mail address entered by the customer by means of a form? This will be sullen cause the email to be classified as Spam, it will not?

    Thank you

    SMTP has no built-in mechanism to validate the sender's address. So, in many cases, you can put whatever you want for the address. But many e-mail servers today use standards such as SPF and DKIM to validate the origin of the e-mail as matching the address of the sender email - valid SPF and DKIM expects this email must be signed by the sender. In addition, the mail server through which you send some mails may refuse messages if it did not belong to a domain for which the server has been configured to accept messages.

    Now, if your goal is to ensure the distribution of mail, but to allow a user to receive a response from an item being sent by a form on your server, you can specify an address corresponding to your infrastructure, but a meet corresponding to their address valid.

    Dave Watts, CTO, Fig Leaf Software

    http://www.figleaf.com/

    http://training.figleaf.com/

  • intrusion via CFMAIL without emaildress

    Hi I have bee responsible for creating a poll online for a specific set of users.  I have a form with 9 questions. The person responsible for the surevey wants emails, or names,

    I. it is possilble to set me up a notifcaton of e-mail when a form is sent without the person's email.

    2. how the hell woul do you?

    Thank you

    Jim

    Put a valid email address in the attribute of the tag of your intrusion via cfmail from.  It doesn't have to be the address of the person completing the survey.

  • intrusion via CFMAIL attachments double sending.

    Hello;

    I wrote an intrusion via cfmail application that allows you to send an attachment. Everything works very well. The problem is that it sends 2 of the uploaded image and I can't understand why. I'm not going to put all my code error and so on, I'm just showing my cffile and then the main part of my intrusion via cfmail, I think that the problem is in the way in which I enclose my file which must be downloaded by the user.

    < cffile action = "upload".
    FileField = "attachment_1."
    destination = "c:\websites\187914Kg3\uploads\".
    nameconflict = "Makeunique" accept = "#request. AcceptImage #">"

    "" < intrusion via cfmail to = "[email protected]"
    "CC ="[email protected]"
    from = "" #Form.email # ""
    object = "has supported the idea.
    Type = "html" SpoolEnable = "no".
    Server = "mail.gmail.com"
    port = "25" >
    < name cfmailparam = 'X-Priority' value = "1" / >

    It's all my stuff e-mail forms

    < cfsilent >
    < cfif FORM.attachment_1 NEQ "" > "".
    < cfmailparam file = "#attachment_local_file_1 #" >
    < / cfif >
    < / cfsilent >
    < cfmailparam file = '#CFFILE. ServerDirectory #/ #CFFILE. ' ServerFile # "remove ="true"/ >
    < / intrusion via cfmail >

    and that's the main part of it outside the shape to send and control of error and these things.
    Can you see what I'm doing wrong here? maybe help me to solve my problem?

    Thank you.

    You have 2 cfmailparam tags there are therefore 2 copies of the attachment. Remove the cfmailparam outside the cfif statement. You may need to add the button remove = "true" to the cfmailparam within the cfif tag.

  • CFLOOP query ti intrusion via cfmail missing the first attachment

    < cfquery name = "895" datasource = "85964" >
    SELECT name OF 568 WHERE ID = #ID #.
    < / cfquery >

    < cfloop query = '895' >
    < to = "" #form.email # intrusion via cfmail "from ="[email protected]"subject =" #form.subject # "" type = "html" > "
    #form.body # < cfoutput > < pre > < / pre > < / cfoutput >
    < cfoutput > < cfmailparam file = "" /45/ #name # "type =" application/pdf"/ > < / cfoutput >"
    < / intrusion via cfmail >
    < / cfloop >

    < cfdump var = "#pdf_list #" >

    It exports the names of files PDF 4 but it send on only 3 times all the missies first file

    Large.  Thanks for the update.

    If you have a chance, please mark this topic as replied.

Maybe you are looking for