We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37523
    • 141 Posts
    Hi all,

    I am looking for a way to create a button that when clicked starts up the users email and fills the body with a pages [[*content]] or a specific div content. Something to using a mailto.

    I do not want to make the user have to fill out a form which then handles the email. Ideally the process will work in a similar way to the File->Share->Email this page menu item within Safari.

    I found a plugin EmailResources that seems to do something similar but only within the manager. I need some way to send the page as an email for non-logged in web users.

    Any advice or suggestions would be greatly appreciated.
      Glyn Szasz
      Sydney, Australia

      Happy to help (when can) and happy to learn

      If you are a Sydney based MODX developer would love to hear from you. Please contact me.
      • 3749
      • 24,544 Posts
      Maybe I'm misunderstanding you, but if the use doesn't fill out a form and isn't logged in, how would MODX know what email address to use?


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 37523
        • 141 Posts
        The actual email is not sent but rather composed and starts up the users email app just like the way that Safari starts up email and fills the body with the web page content once you select "mail contents of this page".

        So there must be a way to dynamically create
        <a href="mailto:.....?body=[[*content]]
        once a user clicks the "mail this page" icon on a web page.
          Glyn Szasz
          Sydney, Australia

          Happy to help (when can) and happy to learn

          If you are a Sydney based MODX developer would love to hear from you. Please contact me.
          • 3749
          • 24,544 Posts
          I think this might do it:

          <a href="mailto:[email protected]?Subject=Hello"&body=[[*content:urlencode]]>


          I think this will also work if you don't want an email address:

          <a href="mailto:?Subject=Hello"&body=[[*content:urlencode]]>



          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            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