We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    This is a recent problem on 2 of my servers... eForm and a couple other Snippets (WebLoginPE) that should be sending emails are failing. I put together a bone-head Snippet to test this:
    <?php
    if(mail('[email protected]', 'My Subject', 'Did it work?') ) {
     print 'The mail was sent';
    }
    ?>


    When I call this Snippet (uncached) on a page, I get the message that the message was sent, but the email never arrives (not even in the Spam folder). Is it possible something is mis-configured on these servers?

    Thanks!
      • 33337
      • 3,975 Posts
      There is a chance of server config problem.

      Due to increased spam, hosts are starting to disable mail functions OR restrict the emails sent "FROM".

      You better ask your host if there is some restrictions on the mail function or similar.

      Hope this helps.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 38755
        • 43 Posts
        I just ran into a situation on a clients hosting account where emails generated by the system were failing, silently from the resources available to me.

        I poked around in WLPE and saw it’s include of the phpmailer class which led me to /manager/includes/controls/class.phpmailer.php

        In this file are blank variables for the the username and password to be used for smtp authentication. I set them to the user/pass of their hosting account and email’s been working fine since. I was a little surprised that these variables don’t appear to be exposed anywhere in the interface for configuration, considering how common it is to need smtp auth for sending mails. Odd thing, in this hosting environment just having the username and password variables populated with valid login info was enough... I didn’t need to change the SMTPAuth bool to true.

        Hope this helps!