Method: users.settings.sendAs.create
カスタムの送信元エイリアスを作成します。SMTP MSA が指定されている場合、Gmail はエイリアスを作成する前に、SMTP サービスへの接続を試み、構成を検証します。エイリアスの所有権の確認が必要な場合は、そのメールアドレスにメッセージが送信され、リソースの確認ステータスが pending
に設定されます。それ以外の場合、リソースの確認ステータスは accepted
に設定されます。署名を指定した場合、HTML はエイリアスを使用して保存する前にサニタイズされます。
この方法は、ドメイン全体の権限を委任されたサービス アカウント クライアントでのみ使用できます。
HTTP リクエスト
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/sendAs
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
userId |
string
ユーザーのメールアドレス。特別な値「me」を使用して、認証済みユーザーを示すことができます。
|
リクエスト本文
リクエストの本文には SendAs
のインスタンスが含まれています。
レスポンスの本文
成功した場合、レスポンスの本文には、新しく作成された SendAs
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/gmail.settings.sharing
詳細については、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-05 UTC。
[null,null,["最終更新日 2024-09-05 UTC。"],[[["Creates a custom \"from\" send-as alias, requiring validation for SMTP MSAs and potentially ownership verification."],["Accessible only to service account clients with delegated domain-wide authority, using a specific HTTP POST request."],["Utilizes path parameters including `userId` to identify the user's email address, and requires a request body with a `SendAs` instance."],["Returns a `SendAs` instance in the response body upon successful alias creation."],["Needs authorization with the `https://www.googleapis.com/auth/gmail.settings.sharing` scope."]]],["This describes how to create a custom \"from\" send-as alias in Gmail using a `POST` request to the specified URL. The request includes a `userId` path parameter. The request body contains `SendAs` information, and the response will also be a `SendAs` instance. The creation process may involve SMTP validation and alias verification, setting the resource's verification status accordingly. It also sanitizes provided HTML signatures. This method is limited to service account clients with delegated domain-wide authority and requires a specific OAuth scope.\n"]]