We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16308
    • 23 Posts
    Hi,

    I’ve added an eform to my modx site. Everything runs smoothly except no mail is sent.

    I know that I am able to send mail from my server, as I have carried out simple mail scripts.

    I’m just wondering what other possible reasons why eform isn’t sending out mail?

    Here are my chunks and snippet call:

    chunks:

    eFeedbackForm:

    [+validationmessage+]
    <form method="post" action="[~[*id*]~]" id="feedbackForm">
        <p><label accesskey="n" for="name">Your Name</label>
        <input type="text" name="name" maxlength="60" eform="Your Name::1:Expected at least two words:#REGEX /^\w+\s\w+/i" /></p>
        <p><label accesskey="e" for="email">Your Email Address</label>
        <input type="text" name="email" size="40" maxlength="40" eform="Your Email Address:email:1" /></p>
        <p><label accesskey="s" for="department">Subject</label>
        <select name="department">
            <option value="1">Website feedback</option>
            <option value="2">Support request</option>
            <option value="3">Feature request</option>
        </select></p>   
        <p><label accesskey="c" for="comments">Comments</label>
        <textarea cols="40" rows="10" name="comments" eform="Comments:html:1"></textarea></p>
        <p>
        <label accesskey="c" for="vericode">code</label>
        <input type="text" name="vericode" size="20" />
        </p>    
        <p><input type="submit" name="submit" value="Send Feedback"></p>
    </form> 



    eFeedbackReport

    <p>This is a response sent by [+name+] using the feedback form on the website. The details of the message follow below:</p>
    <table>
    <tr valign="top"><td>Name:</td><td>[+name+]</td></tr>
    <tr valign="top"><td>Email:</td><td>[+email+]</td></tr>
    <tr valign="top"><td>comments:</td><td>[+comments+]</td></tr>
    </table>
    <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE:[+subject+]">[+email+]</a></p>
    


    eFeedbackThanks

    <h3>Thank you for your feedback</h3>
    <p>Below is a copy of your message:</p>
    <table>
    <tr><td>Your name:</td><td>[+name+]</td></tr>
    <tr><td>Your email address</td><td>[+email+]</td></tr>
    <tr valign="top"><td>Your comments</td><td>[+comments+]</td></tr>
    </table>
    


    snippet call:

    [!eForm? &formid=`feedbackForm` &to=`[(emailsender)]` &tpl=`eFeedbackForm` &report=`eFeedbackReport` &thankyou=`eFeedbackThanks` &subject=`ABC`!]

    I think it may be a problem with the server configuration, I can’t seem to find any errors - although I have been staring at this for a while, I need new eyes!

    Thanks.
      • 30223
      • 1,010 Posts
      Read this topic and this topic and see if that brings you any further, if not do a search on this forum. It will very likely be a server configuration issue and sadly your not unique in this smiley
      • I don’t think this will solve your problem, but it might be nice to know that you don’t need to have the &to parameter at all if you’re going to use the default site email [(emailsender)]; eForm will automatically use that if no &to parameter is provided.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 16308
          • 23 Posts
          ah right,

          I also think you’re right about this one not being the solution - I’ve read through a good portion of this forum, trying to find possible reasons why this wouldn’t work - However, I haven’t been sucessfull. I’ll keep searching - if not, I’ll have to build and write my own scripts - Darn it, I might actually have to do some work!!




            • 30223
            • 1,010 Posts
            Well if you are thinking of taking the time writing and debugging your own script perhaps you could write a simple script that uses phpmailer as your mailer smiley If you get that working it might give us something to go on to find why it doesn’t work with eForm. Who knows you might find a solution that others have been waiting for ... smiley
              • 3749
              • 24,544 Posts
              The SPForm snippet (http://modxcms.com/SPForm-1945.html) uses phpMailer with mail() by default (and would give you a simple contact form to use while you’re debugging eForm). It’s a pretty easy install and would tell you if the problem is in eForm or something at your server. SPForm can be configured to use SMTP -- so can eForm.

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 16308
                • 23 Posts
                Brilliant, very good ideas! I’ll see what I can develop and report back.
                  • 16308
                  • 23 Posts
                  So some progress - Mainly due to my complete lack of knowledge about PHPmailer.

                  My hosts used to create temporary emails to go along with temporary URLs, I figured I wouldn’t need to create another email address for this temporary URL, figured it would be used automatically when sent from the server (wrong of me!)

                  I’ve now set up a seperate email, and added it to modx - Now I have the error:

                  Main mail: Mailer was unable to send mailCould not instantiate mail function.

                  I’ve seen this error in multiple posts, hopefully I’ll be able to figure out what’s going on.

                  Thanks Guys!

                    • 16308
                    • 23 Posts
                    So I’ve attempted to correct the problem using the solution is this post

                    http://modxcms.com/forums/index.php/topic,13173.msg150952.html#msg150952


                    However, this didn’t solve the problem.

                    I’m not really sure of my next step.


                    I’m also having a problem with easy newsletter - Where the newsletters aren’t sent out. They’re sent to my email (Sender’s Email) but none of the subscribers.

                    I recieve this error when attepting to send with SMTP (easy newsletter):

                    Warning: fsockopen() [function.fsockopen]: unable to connect to mail.anorexiabulimiacaretest.co.uk:25 (Connection timed out) in /home/abctest/public_html/manager/includes/controls/class.smtp.php on line 105



                    • Could this be a case where your hosting does not allow the php mail() function to send email outside of the same server (which is why your own mail does get sent)? I’ve moved away from hosting companies that do that.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org