title: gsp mail plugin autosending
body: <p>When I navigate to the page, why is the send() function being called automatically?</p>
  
  <p>I want to be able to view the gsp page, fill in a few text fields, and THEN call the submit with an action of "send"</p>
  
  <p>This is my gsp file    </p>
  
  <pre><code>&lt;%@ page contentType="text/html;charset=UTF-8" %&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/&gt;
  &lt;meta name="layout" content="main"/&gt;
  &lt;title&gt;Contact Form&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;g:form name="contactForm" action = "send"&gt;
      &lt;g:render template = "contactFormFields"/&gt;
      &lt;g:actionSubmit value = "submit" action = "send"/&gt;
  &lt;/g:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the contactFormFields template</p>
  
  <pre><code>&lt;g:select name = 'subject' from = '${EmailService.options}' noSelection='Topic'/&gt;
  
  Contact Name: &lt;g:textField name = "contact"/&gt;
  Contact Number: &lt;g:textField name = "phone"/&gt;
  Contact Email: &lt;g:textField name = "email"/&gt;
  Aditional Information:
  &lt;g:textArea name = "information" rows="5" cols="40"/&gt;
  </code></pre>
  
  <p>EmailServiceController</p>
  
  <pre><code>class EmailServiceController {
  
      def defaultAction = "contactService"
  
      def send() {
          sendMail(){
              to "mygroovytest@gmail.com"
              from params.email
              subject params.subject
              body params.information
          }
      }
  }
  </code></pre>
  
  <p>domain class</p>
  
  <pre><code>class EmailService {
  
      static constraints = {
          def options = new ArrayList()
          options.push("Qestions about service")
          options.push("Feedback on performed service")
          options.push("Other")
          options.push("Why am I doing this")
      }
  }
  </code></pre>
  
  <p>gsp that calls the service</p>
  
  <pre><code>&lt;div class="banner"&gt;
    &lt;h1&gt;My HVAC company&lt;/h1&gt;
    &lt;a href = "javascript: contactPop()"&gt; Contact me today!&lt;/a&gt;
    &lt;a href = "services"&gt;Services&lt;/a&gt;
    &lt;a href = "emailService"&gt;Have Me Contact You!&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>