class UsersSettingsForwardingAddresses extends Resource (View source)

The "forwardingAddresses" collection of methods.

Typical usage is:

 $gmailService = new Google\Service\Gmail(...);
 $forwardingAddresses = $gmailService->users_settings_forwardingAddresses;

Methods

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

Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. This method is only available to service account clients that have been delegated domain-wide authority.

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

Deletes the specified forwarding address and revokes any verification that may have been required. This method is only available to service account clients that have been delegated domain-wide authority.

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

Gets the specified forwarding address. (forwardingAddresses.get)

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

Lists the forwarding addresses for the specified account.

Details

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

Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. This method is only available to service account clients that have been delegated domain-wide authority.

(forwardingAddresses.create)

Parameters

string $userId

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

ForwardingAddress $postBody
array $optParams

Optional parameters.

Return Value

ForwardingAddress

Exceptions

Exception

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

Deletes the specified forwarding address and revokes any verification that may have been required. This method is only available to service account clients that have been delegated domain-wide authority.

(forwardingAddresses.delete)

Parameters

string $userId

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

string $forwardingEmail

The forwarding address to be deleted.

array $optParams

Optional parameters.

Exceptions

Exception

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

Gets the specified forwarding address. (forwardingAddresses.get)

Parameters

string $userId

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

string $forwardingEmail

The forwarding address to be retrieved.

array $optParams

Optional parameters.

Return Value

ForwardingAddress

Exceptions

Exception

ListForwardingAddressesResponse listUsersSettingsForwardingAddresses(string $userId, array $optParams = [])

Lists the forwarding addresses for the specified account.

(forwardingAddresses.listUsersSettingsForwardingAddresses)

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

ListForwardingAddressesResponse

Exceptions

Exception