zbendhiba commented on code in PR #22389: URL: https://github.com/apache/camel/pull/22389#discussion_r3026527673
########## components/camel-google/camel-google-mail/src/main/docs/google-mail-component.adoc: ########## @@ -140,6 +140,165 @@ XML:: </route> ---- ==== +== Data Type Transformer: draft + +The `google-mail:draft` transformer converts a String body into a Gmail `Draft` using mail headers from the exchange. + +It works with `google-mail-stream`, which sets headers like `threadId`, `messageId`, `from`, `to`, `cc`, `bcc`, and `subject` automatically when consuming messages. +You can also set these headers manually to create drafts from scratch. + +=== Headers Review Comment: @Croway In the reply-to use case, we reuse the existing headers from the Camel exchange. When creating a draft from scratch (a new email, not a reply-to), those headers need to be populated explicitly. However, I didn't make them mandatory. A user might want to send a message to an agent about an idea for an email via WhatsApp for example. They may not know the proper email address at that moment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
