[ 
https://issues.apache.org/jira/browse/CAMEL-18326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573056#comment-17573056
 ] 

Jérôme GARCIA edited comment on CAMEL-18326 at 7/29/22 4:35 PM:
----------------------------------------------------------------

Sure but today the data format as a plain text cannot be transform at all, it 
should be a standard and not an already formatted data.

 

Here is an example of the actual data provided by the component : 
{code:java}
// code placeholder
body: test
[1] [image: Bashroom] <https://xxxxx>
[1] * Jérôme xxxxx *
[1] Bashroom's R&D Engineer & Software Architect
[1] 
 {code}
It's not usable to manipulate it.


was (Author: JIRAUSER293631):
Sure but today the data format as a plain text cannot be transform at all, it 
should be a standard and not an already formatted data.

 

Here is an example of the actual data provided by the component : 
{code:java}
// code placeholder
body: test
[1] [image: Bashroom] <https://xxxxx>
[1] * Jérôme xxxxx *
[1] Bashroom's R&D Engineer & Software Architect
[1] 
 {code}
It's not usable to manipulate it.

> google-mail-stream
> ------------------
>
>                 Key: CAMEL-18326
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18326
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-google-mail-stream
>    Affects Versions: 3.16.0
>            Reporter: Jérôme GARCIA
>            Priority: Minor
>              Labels: camel-core, google
>
> Hello,
>  
> In *google-mail-stream* component, the mail body is displayed as plain text 
> and is not easy to manipulate the data.
> The component should add the possibility to change this behavior and 
> displayed a standardize object (JSON or other).
>  
> {code:java}
> // code placeholder
> from('google-mail-stream:index?' +
>   'applicationName={{camel-app-name}}&' +
>   'accessToken={{gmail.client.access.token}}&' +
>   'refreshToken={{gmail.client.access.refresh.token}}&' +
>   'clientId={{gmail.client.id}}&' +
>   'query=is:unread&' +
>   'clientSecret={{gmail.client.secret}}')
>   .log('${body}') {code}
>  
> Here is the format received by google-mail component for example:
>  
> {code:java}
> // code placeholder
> {
>   "historyId": "",
>   "id": "",
>   "internalDate": "",
>   "labelIds": [  ],
>   "payload": {
>     "body": {
>       "size": 0
>     },
>     "filename": "",
>     "headers": [
>       {
>         "name": "",
>         "value": ""
>       }
>     ],
>     "mimeType": "",
>     "partId": "",
>     "parts": [
>       {
>         "body": {
>           "data": "",
>           "size": 241
>         },
>         "filename": "",
>         "headers": [
>           {
>             "name": "",
>             "value": ""
>           }
>         ],
>         "mimeType": "",
>         "partId": ""
>       },
>       {
>         "body": {
>           "data": "",
>           "size": 2519
>         },
>         "filename": "",
>         "headers": [
>           {
>             "name": "",
>             "value": ""
>           }
>         ],
>         "mimeType": "",
>         "partId": ""
>       }
>     ]
>   },
>   "sizeEstimate": 3513,
>   "snippet": "",
>   "threadId": ""
> }
>  {code}
>  
> What do you think?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to