Tworzy niestandardowy alias „Od” nadawcy. Jeśli zostanie określone obowiązkowe powiadomienie SMTP, przed utworzeniem aliasu Gmail spróbuje połączyć się z usługą SMTP, aby sprawdzić konfigurację. Jeśli w przypadku aliasu wymagana jest weryfikacja własności, na adres e-mail zostanie wysłana wiadomość, a stan weryfikacji zasobu zostanie ustawiony na pending. W przeciwnym razie zasób zostanie utworzony ze stanem weryfikacji accepted. Jeśli zostanie podany podpis, Gmail oczyści kod HTML przed zapisaniem go z aliasem.
Ta metoda jest dostępna tylko dla klientów kont usługi, którym przyznano uprawnienia w całej domenie.
Żądanie HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/sendAs
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]