We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20014
    • 200 Posts
    how can i, on a localhost, create a link as login.register would in the email sent out...been having problems testing. since I am on localhost, login can’t successfully send out the email with confirmation link, how should I format a link to test? obviously I don’t just link to the confirmation page, I need to also have a reference to the user id correct?

    the reason I ask this is because, though seemingly configured correctly, in my activation page I get the content from my 404 page inserted into the confimations content, so I assume the link in the email sent out by login.register is formatted in a particular way to tell login.confimregister that the person coming in is such and such user.
      • 3749
      • 24,544 Posts
      You can send the email from Localhost by using SMTP through any email account you have (e.g., Gmail). See the SMTP System Settings. Go to System -> System Settings, and type SMTP in the filter box. Then click on the grid.
        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
        • 20014
        • 200 Posts
        I had no idea, that is invaluable, once again a bow to you bob!
          • 20014
          • 200 Posts
          think I may have to find more info on setting up a localhost email testbed, after spending the afternoon scroogling, I came up with

          these:

          1. setting php ini to send via smtp
          and
          2. installing mail server software

          I am a bit confused because i didn’t use an "all in one" php mysql package, I manually installed mysql and php on my xppro 64bit machine, some forums, blogs, and tuts I found said by setting the php ini no email server was required (depending on the php contained within the mail sent) others said yes it was necessary even some posts here (digging way back)

          I tried several accounts, my last was for gmail

          in php.ini I set:
          [mail function]
          ; For Win32 only.
          SMTP = smtp.googlemail.com (from thunderbird's config on the smtp)
          smtp_port = 465
          
          ; For Win32 only.
          sendmail_from = [email protected]


          in my modx revo install under system settings smtp I set
          smtp authentication 1
          smtp connection prefix tls
          smtp host smtp.googlemail.com (from thunderbird's config on the smtp, I always thought it was gmail)
          smtp password  my password
          smtp port 465 (again looking at what thunderbird detected(
          smtp user [email protected]
          use smtp 1


          on my openSuSE box I could set it up fairly easily to be a mail server, but as I had mentioned in what of my first posts, I am an adobe slave, and virtualization won’t work across several monitors.... sad wish adobe would put out some tarballs, maybe one day gimp and inkscape will catch up. of course, if I wanted to mess with networking my xp machine to my linux box (acting as a server) I guess I could pull it off, but with my knowledge I’d probably end up botching it and putting my network at risk, security wise.

          I tried also my local isp email server and at first I thought it worked because avg spat out about 30 test emails and signup forms I had done while testing my registration and mail pages with odd snippets, I have no idea why it did this, nor could I get it to do it again, because the emails avg had kept (for outgoing scans) all had that link needed to finish my testing of login.register with bob’s snippet...

          I tell you though, email was always the one part I dreaded the most because I scrambled to make sure it worked properly when getting a site live, luckily though I never really had any problems and any way to test forms before going live is essential info.
            • 3749
            • 24,544 Posts
            I think you might be trying too hard. wink

            If you set the Revo SMTP Sysem Settings alone (with the values in their descriptions), that will make mail() use SMTP and it definitely works with Gmail. I suspect that your php.ini settings and attempts to set up a mail server are interfering. Be sure not to use any SMTP settings in your snippets either.
              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