We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37287
    • 10 Posts
    Hey Guys,

    Is there a way to send email in an xml format using eform?

    Thanks,
    stevo
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You could use the eFormOnBeforeMailSent event to trap the mail and send it however you want in your custom function.

      I'm not real sure about this, but I think you could send it as text, with the &sendAsText parameter, and have the report tpl structure it however you wanted. I'm not sure that would work, though.

      Could you generate an xml file and send it as an attachment?
        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
        • 37287
        • 10 Posts
        Thanks for the reply!

        Could you make the &tpl event call a chunk that's in an xml format? im trying to submit this email and have it post into a crm that accepts xml! Does that make sense?

        stevo
          • 37287
          • 10 Posts
          I meant to say the &report parameter not the &tpl parameter!
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I'd suggest giving it a try. Format the report tpl as you wish, and send it as text (not HTML). If the app receiving it can deal with it coming with email headers and recognize the structure from the text, it should work.
              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