ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Add `xml` support for the message request body in the Gmail connector #6736

Open Nuvindu opened 4 months ago

Nuvindu commented 4 months ago

Description: The bodyInHtml field in the MessageRequest type within the gmail client currently supports only string values. Allow the bodyInHtml field to accept xml values in addition to string values can provide additional validation and flexibility.

Relates to: https://github.com/wso2-enterprise/customer-demos-ballerina/pull/86#discussion_r1671635061

Expected behaviour:

gmail:MessageRequest message = {
    to: ...//,
    subject: ...//,
    bodyInHtml: xml `<html>
                            <head>
                                <title>New Releases</title>
                                <body>${body}</body>
                            </head>
                        </html>`
};