blob: b7dda86f1d8d52abf0b73a214fbae589ec2d29c9 [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="gmail_v1.html">Gmail API</a> . <a href="gmail_v1.users.html">users</a> . <a href="gmail_v1.users.settings.html">settings</a> . <a href="gmail_v1.users.settings.sendAs.html">sendAs</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="gmail_v1.users.settings.sendAs.smimeInfo.html">smimeInfo()</a></code>
79</p>
80<p class="firstline">Returns the smimeInfo Resource.</p>
81
82<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070083 <code><a href="#create">create(userId, body=None)</a></code></p>
84<p class="firstline">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.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070085<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070086 <code><a href="#delete">delete(userId, sendAsEmail)</a></code></p>
87<p class="firstline">Deletes the specified send-as alias. Revokes any verification that may have been required for using it.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070088<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070089 <code><a href="#get">get(userId, sendAsEmail)</a></code></p>
90<p class="firstline">Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070091<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070092 <code><a href="#list">list(userId)</a></code></p>
93<p class="firstline">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.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070094<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070095 <code><a href="#patch">patch(userId, sendAsEmail, body=None)</a></code></p>
96<p class="firstline">Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070097<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070098 <code><a href="#update">update(userId, sendAsEmail, body=None)</a></code></p>
99<p class="firstline">Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700100<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700101 <code><a href="#verify">verify(userId, sendAsEmail)</a></code></p>
102<p class="firstline">Sends a verification email to the specified send-as alias address. The verification status must be pending.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700103<h3>Method Details</h3>
104<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code class="details" id="create">create(userId, body=None)</code>
106 <pre>Creates a custom &quot;from&quot; 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&#x27;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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700107
Bu Sun Kim65020912020-05-20 12:08:20 -0700108This method is only available to service account clients that have been delegated domain-wide authority.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400109
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700110Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 userId: string, User&#x27;s email address. The special value &quot;me&quot; can be used to indicate the authenticated user. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700113 The object takes the form of:
114
Bu Sun Kim65020912020-05-20 12:08:20 -0700115{ # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
116 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
117 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
118 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
119 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
120 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
121 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
122 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
123 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
124 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
125 &quot;port&quot;: 42, # The port of the SMTP service. Required.
126 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
127 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
128 },
129 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
130 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
131 }
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700132
133
134Returns:
135 An object of the form:
136
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
138 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
139 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
140 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
141 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
142 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
143 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
144 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
145 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
146 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
147 &quot;port&quot;: 42, # The port of the SMTP service. Required.
148 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
149 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
150 },
151 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
152 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
153 }</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700154</div>
155
156<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 <code class="details" id="delete">delete(userId, sendAsEmail)</code>
158 <pre>Deletes the specified send-as alias. Revokes any verification that may have been required for using it.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700159
Bu Sun Kim65020912020-05-20 12:08:20 -0700160This method is only available to service account clients that have been delegated domain-wide authority.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400161
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700162Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700163 userId: string, User&#x27;s email address. The special value &quot;me&quot; can be used to indicate the authenticated user. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700164 sendAsEmail: string, The send-as alias to be deleted. (required)
165</pre>
166</div>
167
168<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 <code class="details" id="get">get(userId, sendAsEmail)</code>
170 <pre>Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700171
172Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 userId: string, User&#x27;s email address. The special value &quot;me&quot; can be used to indicate the authenticated user. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700174 sendAsEmail: string, The send-as alias to be retrieved. (required)
175
176Returns:
177 An object of the form:
178
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
180 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
181 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
182 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
183 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
184 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
185 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
186 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
187 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
188 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
189 &quot;port&quot;: 42, # The port of the SMTP service. Required.
190 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
191 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
192 },
193 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
194 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
195 }</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700196</div>
197
198<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 <code class="details" id="list">list(userId)</code>
200 <pre>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 &quot;from&quot; aliases.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700201
202Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 userId: string, User&#x27;s email address. The special value &quot;me&quot; can be used to indicate the authenticated user. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700204
205Returns:
206 An object of the form:
207
208 { # Response for the ListSendAs method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 &quot;sendAs&quot;: [ # List of send-as aliases.
210 { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
211 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
212 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
213 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
214 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
215 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
216 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
217 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
218 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
219 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
220 &quot;port&quot;: 42, # The port of the SMTP service. Required.
221 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
222 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
223 },
224 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
225 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700226 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700227 ],
228 }</pre>
229</div>
230
231<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700232 <code class="details" id="patch">patch(userId, sendAsEmail, body=None)</code>
233 <pre>Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.
234
235Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. This method supports patch semantics.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700236
237Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700238 userId: string, User&#x27;s email address. The special value &quot;me&quot; can be used to indicate the authenticated user. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700239 sendAsEmail: string, The send-as alias to be updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700241 The object takes the form of:
242
Bu Sun Kim65020912020-05-20 12:08:20 -0700243{ # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
244 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
245 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
246 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
247 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
248 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
249 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
250 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
251 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
252 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
253 &quot;port&quot;: 42, # The port of the SMTP service. Required.
254 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
255 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
256 },
257 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
258 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
259 }
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700260
261
262Returns:
263 An object of the form:
264
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
266 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
267 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
268 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
269 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
270 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
271 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
272 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
273 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
274 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
275 &quot;port&quot;: 42, # The port of the SMTP service. Required.
276 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
277 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
278 },
279 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
280 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
281 }</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700282</div>
283
284<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 <code class="details" id="update">update(userId, sendAsEmail, body=None)</code>
286 <pre>Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700287
Bu Sun Kim65020912020-05-20 12:08:20 -0700288Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400289
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700290Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 userId: string, User&#x27;s email address. The special value &quot;me&quot; can be used to indicate the authenticated user. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700292 sendAsEmail: string, The send-as alias to be updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700294 The object takes the form of:
295
Bu Sun Kim65020912020-05-20 12:08:20 -0700296{ # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
297 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
298 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
299 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
300 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
301 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
302 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
303 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
304 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
305 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
306 &quot;port&quot;: 42, # The port of the SMTP service. Required.
307 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
308 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
309 },
310 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
311 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
312 }
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700313
314
315Returns:
316 An object of the form:
317
Bu Sun Kim65020912020-05-20 12:08:20 -0700318 { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom &quot;from&quot; address. Send-as aliases correspond to the &quot;Send Mail As&quot; feature in the web interface.
319 &quot;displayName&quot;: &quot;A String&quot;, # A name that appears in the &quot;From:&quot; header for mail sent using this alias. For custom &quot;from&quot; addresses, when this is empty, Gmail will populate the &quot;From:&quot; header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.
320 &quot;isDefault&quot;: True or False, # Whether this address is selected as the default &quot;From:&quot; address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
321 &quot;isPrimary&quot;: True or False, # Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
322 &quot;replyToAddress&quot;: &quot;A String&quot;, # An optional email address that is included in a &quot;Reply-To:&quot; header for mail sent using this alias. If this is empty, Gmail will not generate a &quot;Reply-To:&quot; header.
323 &quot;sendAsEmail&quot;: &quot;A String&quot;, # The email address that appears in the &quot;From:&quot; header for mail sent using this alias. This is read-only for all operations except create.
324 &quot;signature&quot;: &quot;A String&quot;, # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
325 &quot;smtpMsa&quot;: { # Configuration for communication with an SMTP service. # An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail&#x27;s servers to the destination SMTP service. This setting only applies to custom &quot;from&quot; aliases.
326 &quot;host&quot;: &quot;A String&quot;, # The hostname of the SMTP service. Required.
327 &quot;password&quot;: &quot;A String&quot;, # The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
328 &quot;port&quot;: 42, # The port of the SMTP service. Required.
329 &quot;securityMode&quot;: &quot;A String&quot;, # The protocol that will be used to secure communication with the SMTP service. Required.
330 &quot;username&quot;: &quot;A String&quot;, # The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
331 },
332 &quot;treatAsAlias&quot;: True or False, # Whether Gmail should treat this address as an alias for the user&#x27;s primary email address. This setting only applies to custom &quot;from&quot; aliases.
333 &quot;verificationStatus&quot;: &quot;A String&quot;, # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom &quot;from&quot; aliases.
334 }</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700335</div>
336
337<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 <code class="details" id="verify">verify(userId, sendAsEmail)</code>
339 <pre>Sends a verification email to the specified send-as alias address. The verification status must be pending.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700340
Bu Sun Kim65020912020-05-20 12:08:20 -0700341This method is only available to service account clients that have been delegated domain-wide authority.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400342
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700343Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 userId: string, User&#x27;s email address. The special value &quot;me&quot; can be used to indicate the authenticated user. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700345 sendAsEmail: string, The send-as alias to be verified. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700346</pre>
347</div>
348
349</body></html>