Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Cfmail dublicate mails

New Here ,
Aug 25, 2008 Aug 25, 2008
I am trying to create a form to send an e-mail to me (once the form is filled and submitted). It works, however, I get two e-mails send to my email (myemail@hotmail.com) included in the cfmail. I found out that the problem is that the cfmail code is executed twice, the firs is when the page is loaded, and the second is when the form is filled and submitted. My question is how to make the cfmail executed only when the form is submitted and not when the page is first loaded.
Thanks Text
TOPICS
Getting started
349
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Aug 25, 2008 Aug 25, 2008
Move the cfmail code block into the :
<cfif isDefined("Submit2")>
that already exists (where you're doing your database insert).
Translate
Advocate ,
Aug 25, 2008 Aug 25, 2008
Move the cfmail code block into the :
<cfif isDefined("Submit2")>
that already exists (where you're doing your database insert).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2008 Aug 26, 2008
LATEST
Fixed!!!!! Thank you very much Kronin555 for your expertise opinion.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources