We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3677
    • 130 Posts
    I have a form on my site that is configured to use Eform snippet. From what I’ve read, Eform uses the default Modx mailer which is PHPMailer. This is also the same mailer used when requesting a Modx User password.

    I recently disabled all mail services on my server, and of course then I found out that I wasn’t getting any more form mail or mail from the modx password mailer.

    Now I’m trying to re-enable Exim on my server and get it setup as required but I’m still not receiving modx mails.

    Question...does PHPMailer use Exim or Sendmail on localhost to send a message?

    Thanks,
    -Brian
      • 26903
      • 1,336 Posts
      Left to its own devices PHP mail’s default mail handler is the PHP mail function, this itself uses the mailer set in your php.ini file which on my setup is sendmail.

      You’d have to either configure php.ini to use Exim or tell PHP mailer to do this but I think it only uses Qmail, sendmail or SMTP.

      Did you have this working with Exim before you disable your mail services?
        Use MODx, or the cat gets it!
        • 3677
        • 130 Posts
        Well, it was working before my effort to disable all email services and I didn’t understand what method it was using.
        I put in a support ticket with my NOC and they figured out the problem...In WHM Tweak Settings, there is an option:

        "Prevent the user "nobody" from sending out mail to remote addresses (PHP and CGI scripts generally run as nobody if you are not using PHPSuexec and Suexec respectively.)"

        I had turned this off when I disabled all email and didn’t think to turn it back on. tongue

        I think that you are correct in that it is using sendmail on the localhost to send the mail. I assumed that because of what I see in the PHPMailer file "class.phpmailer.php." I’m not familiar with the php.ini you are referring to though...where is it located?
          • 26903
          • 1,336 Posts
          You can find the location of your php.ini file from phpinfo(). You can do this from tools such as phpmyadmin or from the command line using ’php -r "phpinfo();"’.

          Have a look in your maillog (/var/log/maillog on Centos/RHEL) and see it what it thinks is going on when you try and send a mail, if the attempt is logged in here at least its getting that far.

          If not look in your messages log and apache error log for any other pointers.

          Can you send mail locally i.e if you log in as a user can you send mail to another user on the box?
            Use MODx, or the cat gets it!
            • 3749
            • 24,544 Posts
            phpinfo() is also available in the Manager (though the link should probably be more prominent).


            Reports | System Info

            Click on the "view" link

            I thought I’d mention that you can configure phpmailer() to use SMTP through any host where you have an account (I think it’s an option in eForm), so that’s always available if you can’t get a mail problem sorted at your host or are running on your local machine with no mail server installed.
              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
              • 26903
              • 1,336 Posts
              The trouble with PHP Mailer’s SMTP config is that its fairly simplistic, it doesn’t allow you to set many authentication parameters for instance, I have to use SSL and TLS parameter settings to connect to my SMTP mailer host. I swapped to the Swift mailer for this and use ’nail’, rather than ’mail’
                Use MODx, or the cat gets it!