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 e-mails

August 09, 2010 7:02am

Subscribe [2]
  • #1 / Aug 09, 2010 7:02am

    Jabbler

    59 posts

    EE says messages are sent but I don’t receive any of it. EE is configured to mail the messages to 3 recipients.

    I tried using the email_test.php from utilities and mails are sent and received without any problem.

    My problem is exactly like what this user posted: http://ellislab.com/forums/viewthread/153370/P18/

    I changed set server mail to Remote Exchange and changed superadmin e-mail address and it still doesn’t work.

    {exp:email:contact_form user_recipients="false" recipients="xxx@xxx,[email protected],xx@xxx" name="contact_form"  charset="utf-8"}
                <div id="form_field">
                    <ul>
                        <li><input name=&quot;name&quot; type="text" class="validate['required','alphanum']" /></li>
                        <li><input name=&quot;from&quot; type="text" class="validate['required','email']" /></li>
                        <li><input name=&quot;telephone&quot; type="text" class="validate['required', 'phone']" /></li>
                     </ul>
                </div>    
            </div>
             <select name="type_interest" id="type_interest">
                    <option value="cdbox">CD-Box</option>
                    <option value="food">Food Packging</option>
                    <option value="giftbox">Gift Box</option>
                    <option value="unspecified">Unspecified</option>
            </select>
                    
             <label><input type="radio" name=&quot;production_qty&quot; value="individual" id="production_qty" /> Individual</label>
             <label><input type="radio" name=&quot;production_qty&quot; value="promotional" id="production_qty" /> Promotional</label>
             <label><input type="radio" name=&quot;production_qty&quot; value="massprod" id="production_qty" /> Mass Production</label></div>
                 
            
                <div id="form_field">
                    <ul>
                        <li><textarea name=&quot;message&quot; cols="32" rows="6" class="validate['required']" ></textarea></li>
                        <li>{captcha}</li>
                        <li><input name=&quot;captcha&quot; maxlength="20" type="text" class="validate['required']"  /></li>
                        <li id="button"><input name=&quot;Submit&quot; title="Submit" type="Submit" class="button_confirm" /> <input name=&quot;Reset&quot; title="Reset" type="Reset" class="button_confirm" /></li>
                    </ul>
                </div>    
            </div>
    {/exp:email:contact_form}
  • #2 / Aug 09, 2010 5:53pm

    Ingmar

    29245 posts

    What version and build of EE are you using? When you use the “Communicate” tab to send mail to a single recipient, does that work?

  • #3 / Aug 10, 2010 6:56am

    Jabbler

    59 posts

    Communicate does send mail. I managed to fix it. I am using latest version of EE 1 (bundled with EE2).

    It turns out my server does not allow outgoing mails to be sent without a valid ‘from’ e-mail address that is from the same server. Adding replyto=“yes” does not seems to fix the problem, what I did is to hard code a server e-mail address into the e-mail module.

    Here is the fix for future reference.

    First add replyto=“yes” to the e-mail tag and then navigate to modules/email/mod.email.php

    Find all references of

    $email->from($PREFS->ini('webmaster_email'), $PREFS->ini('webmaster_name'));

    Replace with

    //$email->from($PREFS->ini('webmaster_email'), $PREFS->ini('webmaster_name'));
    $email->from("mail@mylocalserver", "My Domain");

    REPLACE mail@mylocalserver and My Domain with a server e-mail address.

     


    Alternatively you could simply change the superadmin’s e-mail address but for personal reasons, I prefer superadmin login to be different with the contact form e-mail.

  • #4 / Aug 10, 2010 8:06am

    Sue Crocker

    26054 posts

    Glad you were able to figure out what the problem was. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases