Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 78 | <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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 83 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 85 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 86 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 88 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 89 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 91 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 92 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 94 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 95 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 97 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 98 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 100 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 101 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 103 | <h3>Method Details</h3> |
| 104 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 105 | <code class="details" id="create">create(userId, body=None)</code> |
| 106 | <pre>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. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 107 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 108 | This method is only available to service account clients that have been delegated domain-wide authority. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 109 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 110 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 111 | userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 112 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 113 | The object takes the form of: |
| 114 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 115 | { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 116 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 120 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 121 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 122 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 123 | "host": "A String", # The hostname of the SMTP service. Required. |
| 124 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 126 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 127 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 130 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
| 131 | } |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 132 | |
| 133 | |
| 134 | Returns: |
| 135 | An object of the form: |
| 136 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 137 | { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 138 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 142 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 143 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 144 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 145 | "host": "A String", # The hostname of the SMTP service. Required. |
| 146 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 148 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 149 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 152 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
| 153 | }</pre> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 154 | </div> |
| 155 | |
| 156 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 157 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 159 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 160 | This method is only available to service account clients that have been delegated domain-wide authority. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 161 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 162 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 163 | userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 164 | sendAsEmail: string, The send-as alias to be deleted. (required) |
| 165 | </pre> |
| 166 | </div> |
| 167 | |
| 168 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 169 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 171 | |
| 172 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 173 | userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 174 | sendAsEmail: string, The send-as alias to be retrieved. (required) |
| 175 | |
| 176 | Returns: |
| 177 | An object of the form: |
| 178 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 179 | { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 180 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 184 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 185 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 186 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 187 | "host": "A String", # The hostname of the SMTP service. Required. |
| 188 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 190 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 191 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 194 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
| 195 | }</pre> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 196 | </div> |
| 197 | |
| 198 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 199 | <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 "from" aliases. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 201 | |
| 202 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 203 | userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 204 | |
| 205 | Returns: |
| 206 | An object of the form: |
| 207 | |
| 208 | { # Response for the ListSendAs method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 209 | "sendAs": [ # 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 "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 211 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 215 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 216 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 217 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 218 | "host": "A String", # The hostname of the SMTP service. Required. |
| 219 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 221 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 222 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 225 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 226 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 227 | ], |
| 228 | }</pre> |
| 229 | </div> |
| 230 | |
| 231 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 232 | <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 | |
| 235 | Addresses 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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 236 | |
| 237 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 238 | userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 239 | sendAsEmail: string, The send-as alias to be updated. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 240 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 241 | The object takes the form of: |
| 242 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 243 | { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 244 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 248 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 249 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 250 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 251 | "host": "A String", # The hostname of the SMTP service. Required. |
| 252 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 254 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 255 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 258 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
| 259 | } |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 260 | |
| 261 | |
| 262 | Returns: |
| 263 | An object of the form: |
| 264 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 265 | { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 266 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 270 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 271 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 272 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 273 | "host": "A String", # The hostname of the SMTP service. Required. |
| 274 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 276 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 277 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 280 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
| 281 | }</pre> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 282 | </div> |
| 283 | |
| 284 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 285 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 287 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 288 | Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 289 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 290 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 291 | userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 292 | sendAsEmail: string, The send-as alias to be updated. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 293 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 294 | The object takes the form of: |
| 295 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 296 | { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 297 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 301 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 302 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 303 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 304 | "host": "A String", # The hostname of the SMTP service. Required. |
| 305 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 307 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 308 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 311 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
| 312 | } |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 313 | |
| 314 | |
| 315 | Returns: |
| 316 | An object of the form: |
| 317 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 318 | { # Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface. |
| 319 | "displayName": "A String", # A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" 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 | "isDefault": True or False, # Whether this address is selected as the default "From:" 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 | "isPrimary": 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 | "replyToAddress": "A String", # An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. |
| 323 | "sendAsEmail": "A String", # The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create. |
| 324 | "signature": "A String", # An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
| 325 | "smtpMsa": { # 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's servers to the destination SMTP service. This setting only applies to custom "from" aliases. |
| 326 | "host": "A String", # The hostname of the SMTP service. Required. |
| 327 | "password": "A String", # 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 | "port": 42, # The port of the SMTP service. Required. |
| 329 | "securityMode": "A String", # The protocol that will be used to secure communication with the SMTP service. Required. |
| 330 | "username": "A String", # 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 | "treatAsAlias": True or False, # Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. |
| 333 | "verificationStatus": "A String", # Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases. |
| 334 | }</pre> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 335 | </div> |
| 336 | |
| 337 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 338 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 340 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 341 | This method is only available to service account clients that have been delegated domain-wide authority. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 342 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 343 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 344 | userId: string, User's email address. The special value "me" can be used to indicate the authenticated user. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 345 | sendAsEmail: string, The send-as alias to be verified. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 346 | </pre> |
| 347 | </div> |
| 348 | |
| 349 | </body></html> |