EmailMessages APIs
-
Email_Content[] to String Helper Function
Description: Retrieves the text content for the given content typeUsage:
POST api/Messages/Email/Helpers/EmailContentObjectArrayToText/{SpokenLanguage}
Parameter Type Source Description SpokenLanguage String FromUri The language to extract the content from ContentObject Email_Content[] FromBody The Email_Content array that contains the current content Returns:
Returns a string containing the textual content of the message including auto-fields if used.
Examples:
<!-- Intent: return the text for the English profile of the message. POST to the following url http://api.v4.swiftreach.com/api/Messages/Email/Helpers/EmailContentObjectArrayToText/English --> <ArrayOfEmail_Content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Email_Content> <SpokenLanguage>English</SpokenLanguage> <Subject>my subject</Subject> <Body> <EMAIL_TEXT_SOURCE xsi:type="EMAIL_TEXT_SOURCE_TEXT"> <Text>this is the body of my English email. </Text> <TextType>email_text_source_text</TextType> </EMAIL_TEXT_SOURCE> <EMAIL_TEXT_SOURCE xsi:type="EMAIL_TEXT_SOURCE_TEXT"> <Text>this is the second part of my english message.</Text> <TextType>email_text_source_text</TextType> </EMAIL_TEXT_SOURCE> </Body> </Email_Content> <Email_Content> <SpokenLanguage>Spanish</SpokenLanguage> <Subject>my subject</Subject> <Body> <EMAIL_TEXT_SOURCE xsi:type="EMAIL_TEXT_SOURCE_TEXT"> <Text>this is the body of my Spanish email</Text> <TextType>email_text_source_text</TextType> </EMAIL_TEXT_SOURCE> </Body> </Email_Content> </ArrayOfEmail_Content> <!-- Example Return Value --> <string>this is the body of my email. this is the second part of my english message.</string>