We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29332
    • 80 Posts
    I know this topic has been open a number of times, but all the results didn’t fix the issue for my site. I’m getting "Main mail: Mailer was unable to send mailCould not instantiate mail function."

    Here’s my call:
    [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46` !]


    I’ve tried it both with an email address and using the call. I’m using the generic Contact page from MODx, and just updated to 1.0.4.
      Teaching myself MODx
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There are so many reasons why the mail() function may not work on any given server that without a lot more information it’s impossible to even try to guess why it’s failing here.
        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
        • 29332
        • 80 Posts
        Ok, what additional information is needed?
          Teaching myself MODx
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Platform (Linux, Windows, ... )
          Web server (Apache, IIS, ... )
          Version of PHP
          Version of MODx

          Can you send mail from a plain .php file? Does your hosting provider have the mail() function blocked or limited to use within the server? Do you need to use SMTP?
            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