We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14050
    • 788 Posts
    Unfortunately, my host disabled the mail() function on my server and this killed eForm. Fortunately for those having problems with the phpmailer class that eForm uses, I went ahead and converted eForm over to SwiftMailer. I have included my modification in case someone else wants to use this.

    WARNING: This has not been tested outside basic functionality (i.e., attachments have not been tested, but should work.)

    To install, overwrite assets/snippets/eform/eform.inc.php with the one that is included (I would backup your current eform.inc.php just in case this one does not work for you).

    Then upload the lib file to manager/includes/controls/ and make sure to leave it named "lib"
      Jesse R.
      Consider trying something new and extraordinary.
      Illinois Wine

      Have you considered donating to MODx lately?
      Donate now. Every contribution helps.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Excellent! I’ve worked with the Swift library before, and like it very much.
        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
        • 5274
        • 177 Posts
        I rely on Swift Mailer in a few of my web projects but I haven’t integrated it with a MODx project yet. Did you use the PHP4 of PHP5 version of Swift in this case? I couldn’t tell on an initial scan through the zip file. Thank you for sharing!
          • 14050
          • 788 Posts
          I used the PHP4 version. It should be rather trivial to convert it to the PHP5 version. I might offer both versions when I get the time.
            Jesse R.
            Consider trying something new and extraordinary.
            Illinois Wine

            Have you considered donating to MODx lately?
            Donate now. Every contribution helps.
            • 5274
            • 177 Posts
            Thanks again for taking the time to put this together. It is in service on my latest MODx project which uses php4. I plan to take a closer look at how you coded this when I get more time. Swift Mailer supports the gophp5 initiative so I’ll be on php5 by 2/5/2008.
              • 14050
              • 788 Posts
              When Magento gets released I will likely upgrade to PHP5, and use that exclusively. So I will likely have this converted by that time frame.

              Let me know if you run into any troubles and I can try to fix it, or if you are comfortable with Swift, feel free to submit the fixes here smiley

              I already believe I can make it a little more efficient with a few code changes.
                Jesse R.
                Consider trying something new and extraordinary.
                Illinois Wine

                Have you considered donating to MODx lately?
                Donate now. Every contribution helps.
                • 30456
                • 37 Posts
                Using Swiftmailer I get this error
                Main mail: Mailer was unable to send mail

                PHP 5.2.5.

                What can be the problem
                  • 14050
                  • 788 Posts
                  The version I included was for PHP4. You will need to download the PHP5 package, and upload it in place of the files I said to upload...and maybe make some small changes to the code I edited if the upload alone doesn’t do the trick. You might want to check this thread:

                  http://modxcms.com/forums/index.php/topic,24192.0.html
                    Jesse R.
                    Consider trying something new and extraordinary.
                    Illinois Wine

                    Have you considered donating to MODx lately?
                    Donate now. Every contribution helps.
                    • 5274
                    • 177 Posts
                    Quote from: Jesse at Mar 26, 2008, 06:40 PM

                    The version I included was for PHP4. You will need to download the PHP5 package, and upload it in place of the files I said to upload...and maybe make some small changes to the code I edited if the upload alone doesn’t do the trick. You might want to check this thread:

                    http://modxcms.com/forums/index.php/topic,24192.0.html

                    Your advise to load the PHP5 version is prudent but I’m using your original PHP4 Swift files on my server running PHP5 and it’s working just fine. You may not have invoked any of the PHP5 features with your coding changes to assets/snippets/eform/eform.inc.php or I may not be calling any of newer features with my eForm pages. Still good advise though.