class UsersSettingsSendAs extends Resource (View source)

The "sendAs" collection of methods.

Typical usage is:

 $gmailService = new Google\Service\Gmail(...);
 $sendAs = $gmailService->users_settings_sendAs;

Methods

create(string $userId, SendAs $postBody, array $optParams = [])

Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. This method is only available to service account clients that have been delegated domain-wide authority. (sendAs.create)

delete(string $userId, string $sendAsEmail, array $optParams = [])

Deletes the specified send-as alias. Revokes any verification that may have been required for using it. This method is only available to service account clients that have been delegated domain-wide authority. (sendAs.delete)

get(string $userId, string $sendAsEmail, array $optParams = [])

Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection. (sendAs.get)

listUsersSettingsSendAs(string $userId, array $optParams = [])

Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom "from" aliases. (sendAs.listUsersSettingsSendAs)

patch(string $userId, string $sendAsEmail, SendAs $postBody, array $optParams = [])

Patch the specified send-as alias. (sendAs.patch)

update(string $userId, string $sendAsEmail, SendAs $postBody, array $optParams = [])

Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. (sendAs.update)

verify(string $userId, string $sendAsEmail, array $optParams = [])

Sends a verification email to the specified send-as alias address. The verification status must be pending. This method is only available to service account clients that have been delegated domain-wide authority.

Details

SendAs create(string $userId, SendAs $postBody, array $optParams = [])

Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. This method is only available to service account clients that have been delegated domain-wide authority. (sendAs.create)

Parameters

string $userId

User's email address. The special value "me" can be used to indicate the authenticated user.

SendAs $postBody
array $optParams

Optional parameters.

Return Value

SendAs

Exceptions

Exception

delete(string $userId, string $sendAsEmail, array $optParams = [])

Deletes the specified send-as alias. Revokes any verification that may have been required for using it. This method is only available to service account clients that have been delegated domain-wide authority. (sendAs.delete)

Parameters

string $userId

User's email address. The special value "me" can be used to indicate the authenticated user.

string $sendAsEmail

The send-as alias to be deleted.

array $optParams

Optional parameters.

Exceptions

Exception

SendAs get(string $userId, string $sendAsEmail, array $optParams = [])

Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection. (sendAs.get)

Parameters

string $userId

User's email address. The special value "me" can be used to indicate the authenticated user.

string $sendAsEmail

The send-as alias to be retrieved.

array $optParams

Optional parameters.

Return Value

SendAs

Exceptions

Exception

ListSendAsResponse listUsersSettingsSendAs(string $userId, array $optParams = [])

Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom "from" aliases. (sendAs.listUsersSettingsSendAs)

Parameters

string $userId

User's email address. The special value "me" can be used to indicate the authenticated user.

array $optParams

Optional parameters.

Return Value

ListSendAsResponse

Exceptions

Exception

SendAs patch(string $userId, string $sendAsEmail, SendAs $postBody, array $optParams = [])

Patch the specified send-as alias. (sendAs.patch)

Parameters

string $userId

User's email address. The special value "me" can be used to indicate the authenticated user.

string $sendAsEmail

The send-as alias to be updated.

SendAs $postBody
array $optParams

Optional parameters.

Return Value

SendAs

Exceptions

Exception

SendAs update(string $userId, string $sendAsEmail, SendAs $postBody, array $optParams = [])

Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. (sendAs.update)

Parameters

string $userId

User's email address. The special value "me" can be used to indicate the authenticated user.

string $sendAsEmail

The send-as alias to be updated.

SendAs $postBody
array $optParams

Optional parameters.

Return Value

SendAs

Exceptions

Exception

verify(string $userId, string $sendAsEmail, array $optParams = [])

Sends a verification email to the specified send-as alias address. The verification status must be pending. This method is only available to service account clients that have been delegated domain-wide authority.

(sendAs.verify)

Parameters

string $userId

User's email address. The special value "me" can be used to indicate the authenticated user.

string $sendAsEmail

The send-as alias to be verified.

array $optParams

Optional parameters.

Exceptions

Exception