We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3296
    • 16 Posts
    where and how do I configure the following,

    hostname
    port number
    smtp
    username
    password

    I’m using dydns and can’t use the mailhop system and can’t relay.
    I setup a messageboard and had success using the smtp functions to send mail out from this same domain where the website is residing.

    in the class.phpmailer.php
    there is a few lines that provide a possible way ,
    ---------------------------

    /////////////////////////////////////////////////

    // SMTP VARIABLES

    /////////////////////////////////////////////////



    /**

    * Sets the SMTP hosts. All hosts must be separated by a

    * semicolon. You can also specify a different port

    * for each host by using this format: [hostname:port]

    * (e.g. "smtp1.example.com:25;smtp2.example.com").

    * Hosts will be tried in order.

    * @var string

    */

    var $Host = "smtp.2453.net";



    /**

    * Sets the default SMTP server port.

    * @var int

    */

    var $Port = 2525;



    /**

    * Sets the SMTP HELO of the message (Default is $Hostname).

    * @var string

    */

    var $Helo = "";



    /**

    * Sets SMTP authentication. Utilizes the Username and Password variables.

    * @var bool

    */

    var $SMTPAuth = false;



    /**

    * Sets SMTP username.

    * @var string

    */

    var $Username = "[email protected]";



    /**

    * Sets SMTP password.

    * @var string

    */

    var $Password = "thepassword";

      • 3749
      • 24,544 Posts
      You could download the Evolution version of the SPForm snippet and take a look at the SMTP code in spformproc.inc.php. It’s fairly simple.

      (Or you could just install and use SPForm or eForm for your contact form and configure them for SMTP.)
        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
        • 3296
        • 16 Posts
        I installed the SPForm configured it to work using the smtp. It worked fine. url for viewing is,
        http://desertmessenger.myphotos.cc/modx/index.php?id=50
        Since I’m using dydns to point to my computer here, is was a great way to test the form to email. Thank you for your guidance.

        I would like to take this a step further and create a snippet that works with SPForm to write to the mysql database.
        I have a database already created that was used for a standalone form-php-mysql with a admin/login interface all in php.
        that allowed the form in php to capture the data, send to the database and send via email.
        Can you or someone give me guidance to creating this?
          • 3749
          • 24,544 Posts
          You could certainly do that, but SPForm (especially the Evolution version) isn’t really set up for that. It’s a quick-and-dirty contact form that doesn’t lend itself well to being extended.

          I’d recommend looking at eForm and at eForm2DB (find it on the forums). The eForm snippet will also send in SMTP, though it’s a little more work to configure.
            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