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.

Your email had no valid recipients.- FIXED

June 29, 2011 9:48am

Subscribe [2]
  • #1 / Jun 29, 2011 9:48am

    JamesBrighton

    146 posts

    When I submit my contact form I get the error ‘Your email had no valid recipients.’ even if a proper email address is being used.

    The site is newly transferred to my local environment, the live version seems to work fine.

    Below is my page code:

    {exp:email:contact_form user_recipients="true" recipients="[email protected]" charset="utf-8" return="{site_url}" redirect="2"}
                <fieldset>
                  <legend></legend>
            <em>Fields marked * are required</em>
                  <div class="text-field form-section"> 
                      <label for="from">Your Email*</label>
                      <input type="text" id="from" name="from" size="40" value="{member_email}" />
                    </div>
                    <div class="text-field form-section"> 
                      <label for="name">Your Name</label>
                      <input type="text" id="name" name="name" size="40" />                 
                    </div>
            <!-- <div class="text-field form-section">
              <label for="subject">Subject</label>
              <input type="text" id="subject" name="subject" size="40" value="" />
            </div> -->
                    
                  <div class="text-field form-section">
              <label for="message">Message*</label>
              <textarea id="message" name="message" rows="18" cols="40"></textarea>
            </div>
            {if captcha}            
            <div class="text-field form-section">    
                Please enter the word you see in the image below*            
                {captcha}
                <input type="text" name="captcha" value="" maxlength="20" />
            </div>
            {/if}
            <div class="button-container">
                      <button type="submit" name="submit" class="send button">Send form</button>
                    </div>
                </fieldset>    
                {/exp:email:contact_form}

    Thanks

  • #2 / Jun 30, 2011 5:54am

    John Henry Donovan

    12339 posts

    Hi James,

    What version and build of EE are you using?

    Set user_recipients= to false because you are not using the to field. That is likely it

    If not then

    Can you test if mail works in your local environment by copying /system/expressionengine/utilities/email_test.php into your root and opening that up in a browser.

    What email protocol are you using in your Email Configuration?

    Can you try it with just the default form from the docs?

  • #3 / Jun 30, 2011 6:00am

    JamesBrighton

    146 posts

    Changing user_recipients= fixed it. Thanks

  • #4 / Jun 30, 2011 6:03am

    John Henry Donovan

    12339 posts

    Good stuff:) Feel free to start a new thread if you have any more questions

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

ExpressionEngine News!

#eecms, #events, #releases