Skip to main content
Inspiring
August 17, 2010
Answered

cfmail without emaildress

  • August 17, 2010
  • 1 reply
  • 1058 views

Hi I have bee tasked to create a web survey for a specific set of are users.  I have a form with 9 questions. The person in charge of the surevey does want emails, or names,

I. Is it possilble for me to setup an email notifcaton when a form is submitted without the person's email.

2. How the heck woul you do it?

Thanks

jim

This topic has been closed for replies.
Correct answer Dan_Bracuk

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

1 reply

Inspiring
August 17, 2010

Can you clarify the task you are trying to accomplish?  What does " setup an email notifcaton when a form is submitted without the person's email." mean?  To whom would you send the email the, survey taker or the person in charge of the survey?

rockhikerAuthor
Inspiring
August 17, 2010

I want the person in charge of the survey to get a notification of when a new  survey has been submitted. However, the submit form does not  include an email field. He does not want their email address.

Legend
August 17, 2010

You can put whatever you want in the email. I think there is some confusion here. The email is not limited to only the information on the form. The email is being generated and sent from the ColdFusion server, not the client browser so that is not an issue.

<cfmail from="webmaster@somedomain.com" to="surveydude@somedomain.com" subject="Survey!">

Someone filled out a survey and here is what he/she provided.

<ul>

<cfloop var="variables.fld" list="#form.fieldList#>

<li>#variables.fld#=#form[variables.fld]#</li>

</cfloop>

</ul>

</cfmail>

<!-- syntax may not be 100%, this was just off the top of my head -->

If I'm not anwswering the question, please repost.