SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot egiblock's Avatar
    Join Date
    Aug 2001
    Location
    Mentor, Ohio
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cf database and null values .. please help


    <CFMAIL
    From="#yourname# - #CompanyName# - (#areacode#)#phonenumber#"
    To="egiblock@runbox.com, #email2#"
    Subject="ds2 test results"
    Type="html">


    #email2# is pulled from the database, but may have nothing in the line of the database....

    i was wondering how to write the code that if there is no value for #email2# to just send to the first email address...

    if i don't have a value for the second email address i get the following error:



    Error resolving parameter EMAIL2


    ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

    1. You have misspelled the parameter name, or
    2. You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.


    The error occurred while processing an element with a general identifier of (CFMAIL), occupying document position (12:3) to (17:1).


  2. #2
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not sure what language this is but can u cynamically set up a to string and then send that.

    for example
    tostring = "egiblock@runbox.com"

    if #email2# not null or ""

    tostring = tostring & #email2#

  3. #3
    SitePoint Zealot egiblock's Avatar
    Join Date
    Aug 2001
    Location
    Mentor, Ohio
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    coldfusion

  4. #4
    SitePoint Addict ownersite's Avatar
    Join Date
    Jul 2001
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about trying...
    PHP Code:
    <CFIF IsDefined("email2") AND email2 GT "">,#email2#</CFIF> or <CFIF email2 GT "">,#email2#</CFIF> 
    Note that the comma is within the <CFIF> tags.
    F150online- 102,000 users strong and growing...
    Ownersite.com
    - tools to enhance vehicle ownership


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
  •