Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default CFMail Urgg

    Can one see what the heck is wrong with this. It runs through the process
    and gives the Thank you message but doesn't send the email.

    <cfparam name="cmd" default="none">

    <link href="/assets/styles/global.css" rel="stylesheet" type="text/css">
    <cfif #cmd# IS "none">
    <script language="JavaScript" type="text/javascript">
    function validateFields(form) {
    if (form.name.value == "") {
    alert('Please Enter Your Name');
    form.name.focus();
    return false;
    }

    if (form.email.value.indexOf('@') < 0) {
    alert('Please Enter a Valid E-Mail Address');
    form.email.focus();
    return false;
    }

    if (form.subject.value == "") {
    alert('Please Enter a Subject');
    form.subject.focus();
    return false;
    }


    if (form.message.value == "") {
    alert('Please Enter Your Message');
    form.message.focus();
    return false;
    }

    return true;
    }
    </script>
    <FIELDSET>
    <legend>Contact Us</legend>
    <blockquote>
    <strong><p align="center"> <a
    href="http://www.mysite.com">MySite.com</a> &amp; Echo Web Technologies <br>
    P.O. Box 41 Echo Bay Ontario,<br>
    Canada. P0S-1C0<br>
    Info <em>at</em> DataPacks <em>dot</em> Com
    </p></strong>
    </blockquote>
    <form onsubmit="return validateFields(this);" method="post"
    action="index.cfm?sector=po&page=contact&cmd=send" >
    <table align="center" border="0" cellpadding="5" cellspacing="0"
    class="tabularData">
    <tr>
    <td align="right"><p>Name:</p></td>
    <td align="left"><input type="text" name="name" /> </td>
    </tr>
    <tr>
    <td align="right"><p>E-mail:</p></td>
    <td align="left"><input type="text" name="email" /> </td>
    </tr>
    <tr>
    <td align="right"><p>Web site:</p></td>
    <td align="left"><input type="text" name="web_site" /> </td>
    </tr>
    <tr>
    <td align="right"><p>Subject:</p></td>
    <td align="left"><input type="text" name="subject" /> </td>
    </tr>
    <tr>
    <td align="right" valign="top"> <p>Message:</p></td>
    <td align="left" valign="top"> <textarea name="message" cols="35"
    rows="10"></textarea> </td>
    </tr>
    <tr>
    <td></td>
    <td align="right"> <div align="left">
    <input type="submit" value="Send Message" />
    </div></td>
    </tr>
    </table>
    </form>
    </FIELDSET>
    <!--- #application.siteinfo.aemail# --->
    <cfelseif #cmd# EQ "send">
    <cfmail to="my@email.com"
    replyto="#form.email#" from="#form.name#"
    subject="#form.subject#"
    type="html"
    server="555.555.555.555">

    <b>Name:</b> #form.name# <br />
    <b>E-mail:</b> #form.email# <br />
    <b>Web site:</b> #form.web_site# <br />
    <b>Subject:</b> #form.subject# <br />
    <b>Message:</b> #form.message#<br />
    <br />
    This e-mail was generated by AlgomaNow.com Feedback Form.
    </cfmail>
    <p><b>Thank-You.</b></p>
    <p>Your e-mail has been sent to us and we will respond accordingly
    shortly. Thank you.</p>
    </cfif>


    Bill Guest

  2. Similar Questions and Discussions

    1. Cfmail help
      I am using one page to process 2 different forms. All of the form information is submitted correctly. The email that is generated however arrives...
    2. CFMAIL and SPF
      Today's question revolves around "Sender Policy Framework, or SPF". All of our client email links on our site prompt our users to create and send...
    3. cfmail help me plz!!
      Hello Friends, I am new to CF, and I am trying to use cfmail to send email. satuation in my case is I have IMail as mail server, CF5, and my page...
    4. <cfmail></cfmail> in a script
      I am wondering if I can put <cfmail> tags and code within a javascript script. will the browser recognize it, and perform the instructions? ...
    5. cfmail - Attribute validation error for tag CFMAIL.
      I'm getting the error ' Attribute validation error for tag CFMAIL.' on the code below. All its doing is outputting a text string to the TO: field. ...
  3. #2

    Default Re: CFMail Urgg

    i'm in a dev environment.. and i have to disable my antivirus for email to
    work. if possible look at the mail log in your cf administrator. it will say,
    connection refused or something like that.. let me know..

    adonis1976 Guest

  4. #3

    Default Re: CFMail Urgg

    It's on the public server. Other mail forms work but for some reason this
    one doesn't

    Bill
    "adonis1976" <webforumsuser@macromedia.com> wrote in message
    news:d5b96n$kvc$1@forums.macromedia.com...
    > i'm in a dev environment.. and i have to disable my antivirus for email to
    > work. if possible look at the mail log in your cf administrator. it will
    > say,
    > connection refused or something like that.. let me know..
    >

    Bill Guest

  5. #4

    Default Re: CFMail Urgg

    I've run into this if the "from" attribute was not a recognized e-mail
    address even though documentation says that it can be any text string.

    from="#form.name#"

    Try

    from="#form.email#"




    "Bill @gmail.com>" <bill.betournay<SpamTrap> wrote in message
    news:d5as9k$2c5$1@forums.macromedia.com...
    > Can one see what the heck is wrong with this. It runs through the process
    > and gives the Thank you message but doesn't send the email.
    >
    > <cfparam name="cmd" default="none">
    >
    > <link href="/assets/styles/global.css" rel="stylesheet" type="text/css">
    > <cfif #cmd# IS "none">
    > <script language="JavaScript" type="text/javascript">
    > function validateFields(form) {
    > if (form.name.value == "") {
    > alert('Please Enter Your Name');
    > form.name.focus();
    > return false;
    > }
    >
    > if (form.email.value.indexOf('@') < 0) {
    > alert('Please Enter a Valid E-Mail Address');
    > form.email.focus();
    > return false;
    > }
    >
    > if (form.subject.value == "") {
    > alert('Please Enter a Subject');
    > form.subject.focus();
    > return false;
    > }
    >
    >
    > if (form.message.value == "") {
    > alert('Please Enter Your Message');
    > form.message.focus();
    > return false;
    > }
    >
    > return true;
    > }
    > </script>
    > <FIELDSET>
    > <legend>Contact Us</legend>
    > <blockquote>
    > <strong><p align="center"> <a
    > href="http://www.mysite.com">MySite.com</a> &amp; Echo Web Technologies
    > <br>
    > P.O. Box 41 Echo Bay Ontario,<br>
    > Canada. P0S-1C0<br>
    > Info <em>at</em> DataPacks <em>dot</em> Com
    > </p></strong>
    > </blockquote>
    > <form onsubmit="return validateFields(this);" method="post"
    > action="index.cfm?sector=po&page=contact&cmd=send" >
    > <table align="center" border="0" cellpadding="5" cellspacing="0"
    > class="tabularData">
    > <tr>
    > <td align="right"><p>Name:</p></td>
    > <td align="left"><input type="text" name="name" /> </td>
    > </tr>
    > <tr>
    > <td align="right"><p>E-mail:</p></td>
    > <td align="left"><input type="text" name="email" /> </td>
    > </tr>
    > <tr>
    > <td align="right"><p>Web site:</p></td>
    > <td align="left"><input type="text" name="web_site" /> </td>
    > </tr>
    > <tr>
    > <td align="right"><p>Subject:</p></td>
    > <td align="left"><input type="text" name="subject" /> </td>
    > </tr>
    > <tr>
    > <td align="right" valign="top"> <p>Message:</p></td>
    > <td align="left" valign="top"> <textarea name="message" cols="35"
    > rows="10"></textarea> </td>
    > </tr>
    > <tr>
    > <td></td>
    > <td align="right"> <div align="left">
    > <input type="submit" value="Send Message" />
    > </div></td>
    > </tr>
    > </table>
    > </form>
    > </FIELDSET>
    > <!--- #application.siteinfo.aemail# --->
    > <cfelseif #cmd# EQ "send">
    > <cfmail to="my@email.com"
    > replyto="#form.email#" from="#form.name#"
    > subject="#form.subject#"
    > type="html"
    > server="555.555.555.555">
    >
    > <b>Name:</b> #form.name# <br />
    > <b>E-mail:</b> #form.email# <br />
    > <b>Web site:</b> #form.web_site# <br />
    > <b>Subject:</b> #form.subject# <br />
    > <b>Message:</b> #form.message#<br />
    > <br />
    > This e-mail was generated by AlgomaNow.com Feedback Form.
    > </cfmail>
    > <p><b>Thank-You.</b></p>
    > <p>Your e-mail has been sent to us and we will respond accordingly
    > shortly. Thank you.</p>
    > </cfif>
    >

    bforce Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139