ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

contact form not sending email

November 24, 2008 7:51pm

Subscribe [2]
  • #1 / Nov 24, 2008 7:51pm

    markwts

    38 posts

    Hi n00b here looking over and over again at code but can’t see where it’s going wrong (not receiving email nor is the return path working) - have used this code on a few other sites and the forms are worekign fine so I’m figuring it’s gotta be a setting EE somewhere (have attached screen of CP Home ›  Admin ›  System Preferences ›  Email Configuration )...

    I thought it may have bneen the name of the site causing email to be caught by spam but have sent/received email via communicate tab and works ok…

    Ok any help would be much apprreciated - thnx. Might just ditch it and go with Freeform ?

    ps - here’s template code:

    {embed="embeds/html_header" my_page_title="Contact Us"}
    <body>
        <div id="container">
            
            <div id="header">
                {embed="embeds/logo_title"}        
                {embed="embeds/main_nav"}
            </div><!-- close header -->    
                
        <div id="content">
            <div id="left">
                    
                    {embed="embeds/sidebar_content"}
                                    
            </div><!-- close left side -->
    
            <div id="right">
                
                    {exp:weblog:entries weblog="contact" disable="categories|member_data|pagination|trackbacks" sort="asc"}
                        <h1 class="title">{title}</h1>
                        {body}
                    {/exp:weblog:entries}
            
            {exp:email:contact_form user_recipients="false" recipients="[email protected]" charset="utf-8" return="{homepage}"}
                  <div>
                <label for="name">Name:</label>
                <input id="name" name="message[]"/>
                <label for="phone">Phone:</label>
                <input id="phone" name="message[]"/>
                <label for="Mobile">Mobile:</label>
                <input id="Mobile" name="message[]"/>
                <label for="from">* Email:</label>
                <input id="from" name="from"/>
                <label for="suburb">Suburb:</label>
                <input id="suburb" name="message[]"/>
                <label for="source">How did you find out about us?</label>
                <select id="source" name="message[]">
                  <option selected="selected">Select »</option>
                  <option value="INTERNET">Internet</option>
                  <option value="REFERRAL">Referral</option>
                  <option value="LOCAL PAPER">Local Paper</option>
                  <option value="BUSINESSCARD">Business Card</option>
                  <option value="OTHER">Other</option>
                </select>
                <label for="details">Other (please give details)</label>
                <input name="details" id="message[]"/>
                <label for="message">Message</label>
                <textarea id="message" name="message[]" rows="10"></textarea>
                <input type="hidden" name="subject" value="Contact from Randy More Hole website"/>
                <br>
                  <button type="submit">Submit</button>
              </div>
          {/exp:email:contact_form}
    
            </div><!-- close right div -->
    
            <div class="clear"></div>
            
        </div>
            
        {embed="embeds/footer"}
                
        </div>
        {embed="embeds/google_analytics"}
       </body>
    </html>
  • #2 / Nov 24, 2008 7:59pm

    Sue Crocker

    26054 posts

    Mark, if EE sends successfully via Communicate, that’s a good sign.

    You could certainly try using Freeform, it wouldn’t hurt. I find it to be a great solution for the times you have a lot of items to capture.

  • #3 / Nov 24, 2008 8:08pm

    markwts

    38 posts

    Mark, if EE sends successfully via Communicate, that’s a good sign.

    You could certainly try using Freeform, it wouldn’t hurt. I find it to be a great solution for the times you have a lot of items to capture.

    Gday Sue - that was quick! Ok yeah probably a good habit to get into just going with freeform. So out of curiosity my code looks ok above? If so then I’ll just rebuild with freeform.

    Thnx for your help 😉

  • #4 / Nov 24, 2008 8:13pm

    Sue Crocker

    26054 posts

    You’d need to redo it. First of all start with a very basic form, and make sure it sends. Then start adding complexity.

  • #5 / Nov 24, 2008 8:24pm

    markwts

    38 posts

    You’d need to redo it. First of all start with a very basic form, and make sure it sends. Then start adding complexity.

    Ok no probs - thnx for your help 😉

    ps edit: yep freeform is the gun - all working now - thanks! 😊

  • #6 / Nov 25, 2008 3:16pm

    Sue Crocker

    26054 posts

    Glad things are working again. Don’t hesitate to post again if needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases