Error on Synchronization of google mail while inserting email details.
Description - Error occurred during the save email details into database where it gives error on saving HTML_Body in the form of HTML by adding slash [addSlashes()]. We have added slash to HTML because we have decoded the body details for mail response in HTML format and we are display the mail body on mail details so we have added slash into it.
Error -
{
"message": "Incorrect string value: '\\xF0\\x9F\\x87\\xA8\\xF0\\x9F...' for column '_Html_Body' at row 1",
"code": "ER_TRUNCATED_WRONG_VALUE_FOR_FIELD"
}
Steps to Resolve -
Check Html_Body content without adding fn addSlashes() weather it takes it write or not by adding only replace(/"/g, "'")
Check method Local_SaveEmailPayloadParts on lambda funtion where we are decoding FromBase64ForUrlString into plain and html body.
If Html body contain extra slash or smiley content then replace and it with alternate special char to html.
Error on Synchronization of google mail while inserting email details.
Description - Error occurred during the save email details into database where it gives error on saving HTML_Body in the form of HTML by adding slash [addSlashes()]. We have added slash to HTML because we have decoded the body details for mail response in HTML format and we are display the mail body on mail details so we have added slash into it.
Error -
Steps to Resolve -
Check method Local_SaveEmailPayloadParts on lambda funtion where we are decoding FromBase64ForUrlString into plain and html body.