target.apidocs.com.google.api.services.gmail.Gmail.Users.Settings.SendAs.html Maven / Gradle / Ivy
Gmail.Users.Settings.SendAs (Gmail API v1-rev20230925-2.0.0)
com.google.api.services.gmail
Class Gmail.Users.Settings.SendAs
- java.lang.Object
-
- com.google.api.services.gmail.Gmail.Users.Settings.SendAs
-
- Enclosing class:
- Gmail.Users.Settings
public class Gmail.Users.Settings.SendAs
extends Object
The "sendAs" collection of methods.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Gmail.Users.Settings.SendAs.Create
class
Gmail.Users.Settings.SendAs.Delete
class
Gmail.Users.Settings.SendAs.Get
class
Gmail.Users.Settings.SendAs.List
class
Gmail.Users.Settings.SendAs.Patch
class
Gmail.Users.Settings.SendAs.SmimeInfo
The "smimeInfo" collection of methods.
class
Gmail.Users.Settings.SendAs.Update
class
Gmail.Users.Settings.SendAs.Verify
-
Constructor Summary
Constructors
Constructor and Description
SendAs()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Gmail.Users.Settings.SendAs.Create
create(String userId,
SendAs content)
Creates a custom "from" send-as alias.
Gmail.Users.Settings.SendAs.Delete
delete(String userId,
String sendAsEmail)
Deletes the specified send-as alias.
Gmail.Users.Settings.SendAs.Get
get(String userId,
String sendAsEmail)
Gets the specified send-as alias.
Gmail.Users.Settings.SendAs.List
list(String userId)
Lists the send-as aliases for the specified account.
Gmail.Users.Settings.SendAs.Patch
patch(String userId,
String sendAsEmail,
SendAs content)
Patch the specified send-as alias.
Gmail.Users.Settings.SendAs.SmimeInfo
smimeInfo()
An accessor for creating requests from the SmimeInfo collection.
Gmail.Users.Settings.SendAs.Update
update(String userId,
String sendAsEmail,
SendAs content)
Updates a send-as alias.
Gmail.Users.Settings.SendAs.Verify
verify(String userId,
String sendAsEmail)
Sends a verification email to the specified send-as alias address.
-
-
Method Detail
-
create
public Gmail.Users.Settings.SendAs.Create create(String userId,
SendAs content)
throws IOException
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.
Create a request for the method "sendAs.create".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- User's email address. The special value "me" can be used to indicate the authenticated user.
[default: me]
content
- the SendAs
- Returns:
- the request
- Throws:
IOException
-
delete
public Gmail.Users.Settings.SendAs.Delete delete(String userId,
String sendAsEmail)
throws IOException
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.
Create a request for the method "sendAs.delete".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- User's email address. The special value "me" can be used to indicate the authenticated user.
[default: me]
sendAsEmail
- The send-as alias to be deleted.
- Returns:
- the request
- Throws:
IOException
-
get
public Gmail.Users.Settings.SendAs.Get get(String userId,
String sendAsEmail)
throws IOException
Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a
member of the collection.
Create a request for the method "sendAs.get".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- User's email address. The special value "me" can be used to indicate the authenticated user.
[default: me]
sendAsEmail
- The send-as alias to be retrieved.
- Returns:
- the request
- Throws:
IOException
-
list
public Gmail.Users.Settings.SendAs.List list(String userId)
throws IOException
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.
Create a request for the method "sendAs.list".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- User's email address. The special value "me" can be used to indicate the authenticated user.
[default: me]
- Returns:
- the request
- Throws:
IOException
-
patch
public Gmail.Users.Settings.SendAs.Patch patch(String userId,
String sendAsEmail,
SendAs content)
throws IOException
Patch the specified send-as alias.
Create a request for the method "sendAs.patch".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- User's email address. The special value "me" can be used to indicate the authenticated user.
[default: me]
sendAsEmail
- The send-as alias to be updated.
content
- the SendAs
- Returns:
- the request
- Throws:
IOException
-
update
public Gmail.Users.Settings.SendAs.Update update(String userId,
String sendAsEmail,
SendAs content)
throws IOException
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.
Create a request for the method "sendAs.update".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- User's email address. The special value "me" can be used to indicate the authenticated user.
[default: me]
sendAsEmail
- The send-as alias to be updated.
content
- the SendAs
- Returns:
- the request
- Throws:
IOException
-
verify
public Gmail.Users.Settings.SendAs.Verify verify(String userId,
String sendAsEmail)
throws IOException
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.
Create a request for the method "sendAs.verify".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- User's email address. The special value "me" can be used to indicate the authenticated user.
[default: me]
sendAsEmail
- The send-as alias to be verified.
- Returns:
- the request
- Throws:
IOException
-
smimeInfo
public Gmail.Users.Settings.SendAs.SmimeInfo smimeInfo()
An accessor for creating requests from the SmimeInfo collection.
The typical use is:
Gmail gmail = new Gmail(...);
Gmail.SmimeInfo.List request = gmail.smimeInfo().list(parameters ...)
- Returns:
- the resource collection
Copyright © 2011–2023 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy