We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18262
    • 2 Posts
    I had an issue where I needed eform to use sendmail instead of the php mail() function. Main reason was I could override the smtp server sendmail was connecting too for a specific domain. To do this I had to find and replace all references in the form snippet of $mail->IsMail(); to $mail->IsSendmail(); Once that was done all email forms were now going through sendmail. If someone else knows of a less invasive way of doing this I would be glad to see it. Otherwise hope this helps someone else out.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You are correct. To use SMTP or sendmail you need to edit the code.

      If this is a sitewide requirement, you can actually edit the /manager/includes/controls/class.phpmailer.php file, setting the appropriate values there, then you don’t have to worry about eform or any other mailing subsystem that uses that mailing library. Line 106 of that file:
           * Method to send mail: ("mail", "sendmail", or "smtp").
           * @var string
           */
          var $Mailer            = "mail";
      
          /**
           * Sets the path of the sendmail program.
           * @var string
           */
          var $Sendmail          = "/usr/sbin/sendmail";
      
        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