Hi, I am trying to send an email from mendix to mailbox. The ‘Send Message’ button triggers the microflow to send email. The ‘Body’ variable holds the content of the mail. Here is the email received I want the message body to be exactly same as I created above and not render the XML. Also, the $ContactUs/Subject attribute value is missing in the mail received. How can I send the message as plain text without rendering? I want the mail received to be as following: <?xml version="1.0"?> <Request> <Category>Product</Category> <Area>Manufacturing</Area> <Impact>User</Impact> <Title>Test Subject</Title> <Description>Test Description Note: This is auto generated</Description> <Type>Service Request</Type> <Email>firstname.lastname@example.org</Email> </Request>
If you are building XML you would be better to look at an Export Mapping rather than string manipulation. That will handle any escaping of characters automatically, and prevent injection of other elements into your XML.
Which module are you using to send the email, or have you built your own?
you could probably use CDATA to mark the content as character data but, for what you’re showing here, attaching this content as an XML file attachment to the sent email might make more sense? This module in the marketplace has an example: https://marketplace.mendix.com/link/component/259