We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33992 ☆ A M B ☆
    • 455 Posts
    Hi,
    I need to send emails within a snippet, is it possible to use eform to send email? eform needs a form(needs &formId) and submit the form but i want to send specified email after something happens so i have no form(no fomId) to process.
    if it’s possible, please tell me HOW and tell me what is better and simpler to use in snippets, EForm or phpmailer?

    Thanks
    AHHP
      God loves me. 【ツ】


      MODX.ir (Persian Support)

      Boplo.ir/modx/ (Persian)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you only need to send email but no form involved, then a snippet is good. eForm is just what its name indicates... for managing forms.

      Here’s a handy page for using phpmailer.

      http://phpmailer.codeworxtech.com/tutorial.html#2

      Some other snippets already have built-in mailers; what exactly are you doing that will trigger the sending of mail?
        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
        • 33992 ☆ A M B ☆
        • 455 Posts
        Thank you again,
        It seems you are my MODxian angel who search the posts and reply MY questions wink, you answer all of my questions
        Thank you, thank you and...

        I’m trying to create my site and i should create codes for it, i’m new in php and have no experience. sending mail is a part of my site that must report something to site-user.
          God loves me. 【ツ】


          MODX.ir (Persian Support)

          Boplo.ir/modx/ (Persian)
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          A snippet to send mail isn’t difficult; the phpmailer tutorial I linked to shows you how to do that. The tricky part will be triggering the sending of the mail. Depending on what event triggers that, you may want to make a plugin. Plugins will activate on quite a number of events, from various stages of generating the web page to users logging in or logging out or registering. So you could have a plugin to send email every time someone looked at a specific page, or every time someone in the Manager edited a document.
            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
            • 33992 ☆ A M B ☆
            • 455 Posts
            Thank you again ( i can only tell this for your perfect guides smiley ).

            would you show me some references about plugin-coding,plugin-events and even module-coding?
            understandable references of course! wink
            i need to know more about those.

            Have fun!
              God loves me. 【ツ】


              MODX.ir (Persian Support)

              Boplo.ir/modx/ (Persian)
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I have a three-part tutorial on making a module on my site, but I’m not aware of any plugin tutorials. Mostly I just take one of the simple plugins and rearrange it to suit my purpose.
                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
                • 33992 ☆ A M B ☆
                • 455 Posts
                I saw your site and saved your tutorials grin they are useful surely.
                don’t you want to add your tutorials links to your signature or create a WIKI page?
                I can’t remember anything about creating modules when i was born and i don’t know how others know it, someones who know about MODx coding would create tutorials and release publicly for all.

                I’m waiting for more your useful tutorials.

                It seems i must put your name as one of site designers cause of your guides for my site creation.
                  God loves me. 【ツ】


                  MODX.ir (Persian Support)

                  Boplo.ir/modx/ (Persian)
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  If I put everything I did in the Wiki then I wouldn’t have anything to put on my site (unless you’re interested in the side-to-side cowl neck sweater I’m crocheting out of a variegated earth-tones mohair blend yarn. That’s what happens when you have a geek granny grin ).

                  The links to my sites are in my sig; feel free to log in to my manager and poke around.
                    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
                    • 33992 ☆ A M B ☆
                    • 455 Posts
                    Anyway you are in MODx Doc team and everyone wait for your articles.
                    you know better wink
                      God loves me. 【ツ】


                      MODX.ir (Persian Support)

                      Boplo.ir/modx/ (Persian)