このコンテンツは選択した言語では利用できません。

48.5. gmail


gmail Component

The gmail component contributes to the Camel Components for Google App Engine (GAE). It supports sending of emails via the GAE mail service. Receiving mails is not supported yet but will be added later. Currently, only Google accounts that are application administrators can send emails.

URI format

gmail://user@gmail.com[?options]
gmail://user@googlemail.com[?options]

Options

Name Default Value Context Description
to null Producer To-receiver of the email. This can be a single receiver or a comma-separated list of receivers.
cc null Producer Cc-receiver of the email. This can be a single receiver or a comma-separated list of receivers.
bcc null Producer Bcc-receiver of the email. This can be a single receiver or a comma-separated list of receivers.
subject null Producer Subject of the email.
outboundBindingRef reference to GMailBinding Producer Reference to an OutboundBinding<GMailEndpoint, MailService.Message, void> in the Registry for customizing the binding of an Exchange to the mail service.

Message headers

Name Type Context Description
GMailBinding.GMAIL_SUBJECT String Producer Subject of the email. Overrides subject endpoint option.
GMailBinding.GMAIL_SENDER String Producer Sender of the email. Overrides sender definition in endpoint URI.
GMailBinding.GMAIL_TO String Producer To-receiver(s) of the email. Overrides to endpoint option.
GMailBinding.GMAIL_CC String Producer Cc-receiver(s) of the email. Overrides cc endpoint option.
GMailBinding.GMAIL_BCC String Producer Bcc-receiver(s) of the email. Overrides bcc endpoint option.

Message body

On the producer side the in message body is converted to a String.

Usage

...
.setHeader(GMailBinding.GMAIL_SUBJECT, constant("Hello"))
.setHeader(GMailBinding.GMAIL_TO, constant("account2@somewhere.com"))
.to("gmail://account1@gmail.com");
Sends an email with subject Hello from account1@gmail.com to account2@somewhere.com. The mail message body is taken from the in message body. Please note that account1@gmail.com must be an administrator account for the current GAE application.

Dependencies

Maven users will need to add the following dependency to their pom.xml.
pom.xml
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-gae</artifactId>
    <version>${camel-version}</version>
</dependency>
where $\{camel-version\} must be replaced by the actual version of Apache Camel (2.1.0 or higher).
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.