>Hi Stevo,
>
>#iif(not len(trim(email)),DE('my company email'),"email")# should get
>you where you need to go.
>
>However, you may want to solve this problem at the database level (or
>whatever layer is one up from where you currently are) so that you don't
>have to continually implement this if you need to do the same logic in
>another place. Perhaps something like this:
>
>SELECT
> CASE email
> WHEN NULL THEN '[EMAIL PROTECTED]'
> ELSE email
> END AS email
>FROM customers
>WHERE customerId = customerId
>
>-joe
>
>
>
>-----Original Message-----
>From: Stevo Vee [mailto:[EMAIL PROTECTED]
>Sent: Monday, June 14, 2004 11:55 AM
>To: CF-Talk
>Subject: cfmail problem
>
>Please Help. I am changing some forms and actions on my website. I have
>a lead subscription website and currently the lead emails that go to my
>subscribing companies have my websites email as the sent and reply
>email with the customers in the form. I am changing to have the
>potential
>customers as the from and reply email now which I have acomplished.
>HOWEVER, now if the customer does not have an email the lead gets lost
>in
>cyber space. How can I make add a rule that if the customer has no
>email and only phone that it at least goes to me or my subcribing
>companies
>using perhaps my websites email acting as a default?? Below is the
>current code: Your help or advice would be greatly appreciated. Thanks.
>
><cfmail to="#CompanyEmail#" cc="[EMAIL PROTECTED]" from="#Email# "
>subject="leads #CategoryText# Lead">#CategoryText#
>
>I have tried the following but it still did not work:
>CFIF trim(Email) EQ "">
> <CFSET Email = "my company email">
></CFIF>
>
><cfmail to="#CompanyEmail#" cc="my company email" from="#Email# "
>subject="leads #CategoryText# Lead">#CategoryText#
><cfif CategoryID IS 2>Company Name: #FORM.CompanyName#</cfif>
>
>FROM="#iif(email EQ '',DE('my company email'),email)#"
>
>Try that too. I didn't test it...it might need to be #iif(email EQ
>'',DE('my company email'),DE(email))#
> _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]