mailslurp_client 8.3.0 → 8.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e376f040ab4f7c4f9b8a7f2cc37d26e6e1fb7b4de17c7910fd0546b83967a31a
4
- data.tar.gz: 9be17286f4a983f3916b22473627371b46c0189988f848477fae897402434fbb
3
+ metadata.gz: 3efaa012e6540bf6b737779f13998a6148b322c70cdf8065dd4d93b1c1045713
4
+ data.tar.gz: 757d32f65229b03af69e52a7b5560abe1e369305daa0f2028586579a4e5aa049
5
5
  SHA512:
6
- metadata.gz: 50c0382af36f9a4bb707b628e80180f4882a1b75575097862f350c02fe9d29b076f5d2cfcf3bfc88e22a967f655673f889e66d0889535653723be61f0f2aa4b2
7
- data.tar.gz: cfac41f0383d467211632dcbc6773b401181b9e696c93d50bed0c9209117c3dc67e1e141ca0e55aef86ff2167b577ac5585b737d4cb5e38e85325e21553914a9
6
+ metadata.gz: 203de8c176baa26b46b0a96f129e8f2cbd86e7a077373fdde18799f7c6145679d58bfbc22685b1de0067ac33c007fb0549e94b2adefe536ae2ff923cc726007c
7
+ data.tar.gz: ea1f1f2e80960c491c50bbfd6ec36af4acd8dcccfc9ea286e1e2780e81a9f15367b68c74dd48329ab56d0052c4cac5b5e8f5474e7b2a4c3a484ffcb50a1d7a9b
data/README.md CHANGED
@@ -41,7 +41,7 @@ gem install mailslurp_client
41
41
  Or in your `Gemfile`:
42
42
 
43
43
  ```ruby
44
- gem 'mailslurp_client', '~> 8.2', '>= 8.2.2'
44
+ gem 'mailslurp_client', '~> 8.3', '>= 8.3.0'
45
45
  ```
46
46
 
47
47
  And then run bundler install:
@@ -90,6 +90,35 @@ it 'can create email addresses' do
90
90
  end
91
91
  ```
92
92
 
93
+ #### More options
94
+ The `create_inbox` method has some limitations in the Ruby client. To create inboxes with more options use the alternative
95
+ `create_inbox_with_options` method. (This uses a request body instead of query parameters.)
96
+
97
+ ```ruby
98
+ it 'can an inbox with tags' do
99
+ inbox_controller = MailSlurpClient::InboxControllerApi.new
100
+ # create an inbox with tags
101
+ inbox = inbox_controller.create_inbox_with_options({
102
+ tags: ['t1','t2'],
103
+ description: "test with tags",
104
+ name: "test name"
105
+ })
106
+
107
+ # has tags
108
+ expect(inbox.id).to be_truthy
109
+ expect(inbox.description).to be_truthy
110
+ expect(inbox.name).to be_truthy
111
+ expect(inbox.tags).to include('t1')
112
+ expect(inbox.tags).to include('t2')
113
+
114
+ # can update tags
115
+ inbox_updated = inbox_controller.update_inbox(inbox.id, {
116
+ tags: ['newtag']
117
+ })
118
+ expect(inbox_updated.tags).to eq(['newtag'])
119
+ end
120
+ ```
121
+
93
122
  ### List inboxes
94
123
 
95
124
  Inboxes you create can be listed in a paginated way.
@@ -234,7 +263,7 @@ email = wait_controller.wait_for_latest_email(wait_opts)
234
263
  # find the attachments on the email object
235
264
  expect(email.attachments.size).to be(1)
236
265
 
237
- # download the attachment
266
+ # download the attachment as base64 (easier than byte arrays for ruby client)
238
267
  email_controller = MailSlurpClient::EmailControllerApi.new
239
268
  downloaded_attachment = email_controller.download_attachment_base64(email.attachments[0], email.id)
240
269
 
@@ -17,18 +17,19 @@ require 'mailslurp_client/version'
17
17
  require 'mailslurp_client/configuration'
18
18
 
19
19
  # Models
20
+ require 'mailslurp_client/models/alias_dto'
21
+ require 'mailslurp_client/models/alias_projection'
20
22
  require 'mailslurp_client/models/attachment_meta_data'
21
23
  require 'mailslurp_client/models/basic_auth_options'
22
24
  require 'mailslurp_client/models/bulk_send_email_options'
23
25
  require 'mailslurp_client/models/contact_dto'
24
26
  require 'mailslurp_client/models/contact_projection'
25
27
  require 'mailslurp_client/models/content_match_options'
26
- require 'mailslurp_client/models/create_anonymous_alias_options'
28
+ require 'mailslurp_client/models/create_alias_options'
27
29
  require 'mailslurp_client/models/create_contact_options'
28
30
  require 'mailslurp_client/models/create_domain_options'
29
31
  require 'mailslurp_client/models/create_group_options'
30
32
  require 'mailslurp_client/models/create_inbox_dto'
31
- require 'mailslurp_client/models/create_owned_alias_options'
32
33
  require 'mailslurp_client/models/create_template_options'
33
34
  require 'mailslurp_client/models/create_webhook_options'
34
35
  require 'mailslurp_client/models/dns_lookup_options'
@@ -68,6 +69,7 @@ require 'mailslurp_client/models/page_template_projection'
68
69
  require 'mailslurp_client/models/page_webhook_projection'
69
70
  require 'mailslurp_client/models/pageable'
70
71
  require 'mailslurp_client/models/raw_email_json'
72
+ require 'mailslurp_client/models/reply_to_email_options'
71
73
  require 'mailslurp_client/models/send_email_options'
72
74
  require 'mailslurp_client/models/sent_email_dto'
73
75
  require 'mailslurp_client/models/sent_email_projection'
@@ -78,6 +80,7 @@ require 'mailslurp_client/models/template_dto'
78
80
  require 'mailslurp_client/models/template_projection'
79
81
  require 'mailslurp_client/models/template_variable'
80
82
  require 'mailslurp_client/models/unread_count'
83
+ require 'mailslurp_client/models/update_alias_options'
81
84
  require 'mailslurp_client/models/update_group_contacts'
82
85
  require 'mailslurp_client/models/update_inbox_options'
83
86
  require 'mailslurp_client/models/upload_attachment_options'
@@ -19,28 +19,28 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create an email alias
23
- # Create an email alias belonging to a user ID. To create anonymous aliases use the `createAnonymousAlias` method.
24
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
22
+ # Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
23
+ # Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
24
+ # @param create_alias_options [CreateAliasOptions] createAliasOptions
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def create_alias(create_owned_alias_options, opts = {})
28
- create_alias_with_http_info(create_owned_alias_options, opts)
29
- nil
26
+ # @return [AliasDto]
27
+ def create_alias(create_alias_options, opts = {})
28
+ data, _status_code, _headers = create_alias_with_http_info(create_alias_options, opts)
29
+ data
30
30
  end
31
31
 
32
- # Create an email alias
33
- # Create an email alias belonging to a user ID. To create anonymous aliases use the `createAnonymousAlias` method.
34
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
32
+ # Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
33
+ # Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
34
+ # @param create_alias_options [CreateAliasOptions] createAliasOptions
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
- def create_alias_with_http_info(create_owned_alias_options, opts = {})
36
+ # @return [Array<(AliasDto, Integer, Hash)>] AliasDto data, response status code and response headers
37
+ def create_alias_with_http_info(create_alias_options, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: AliasControllerApi.create_alias ...'
40
40
  end
41
- # verify the required parameter 'create_owned_alias_options' is set
42
- if @api_client.config.client_side_validation && create_owned_alias_options.nil?
43
- fail ArgumentError, "Missing the required parameter 'create_owned_alias_options' when calling AliasControllerApi.create_alias"
41
+ # verify the required parameter 'create_alias_options' is set
42
+ if @api_client.config.client_side_validation && create_alias_options.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_alias_options' when calling AliasControllerApi.create_alias"
44
44
  end
45
45
  # resource path
46
46
  local_var_path = '/aliases'
@@ -59,10 +59,10 @@ module MailSlurpClient
59
59
  form_params = opts[:form_params] || {}
60
60
 
61
61
  # http body (model)
62
- post_body = opts[:body] || @api_client.object_to_http_body(create_owned_alias_options)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(create_alias_options)
63
63
 
64
64
  # return_type
65
- return_type = opts[:return_type]
65
+ return_type = opts[:return_type] || 'AliasDto'
66
66
 
67
67
  # auth_names
68
68
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -83,69 +83,7 @@ module MailSlurpClient
83
83
  return data, status_code, headers
84
84
  end
85
85
 
86
- # Create an anonymous email alias
87
- # @param create_anonymous_alias_options [CreateAnonymousAliasOptions] createAnonymousAliasOptions
88
- # @param [Hash] opts the optional parameters
89
- # @return [ModelAlias]
90
- def create_anonymous_alias(create_anonymous_alias_options, opts = {})
91
- data, _status_code, _headers = create_anonymous_alias_with_http_info(create_anonymous_alias_options, opts)
92
- data
93
- end
94
-
95
- # Create an anonymous email alias
96
- # @param create_anonymous_alias_options [CreateAnonymousAliasOptions] createAnonymousAliasOptions
97
- # @param [Hash] opts the optional parameters
98
- # @return [Array<(ModelAlias, Integer, Hash)>] ModelAlias data, response status code and response headers
99
- def create_anonymous_alias_with_http_info(create_anonymous_alias_options, opts = {})
100
- if @api_client.config.debugging
101
- @api_client.config.logger.debug 'Calling API: AliasControllerApi.create_anonymous_alias ...'
102
- end
103
- # verify the required parameter 'create_anonymous_alias_options' is set
104
- if @api_client.config.client_side_validation && create_anonymous_alias_options.nil?
105
- fail ArgumentError, "Missing the required parameter 'create_anonymous_alias_options' when calling AliasControllerApi.create_anonymous_alias"
106
- end
107
- # resource path
108
- local_var_path = '/aliases/anonymous'
109
-
110
- # query parameters
111
- query_params = opts[:query_params] || {}
112
-
113
- # header parameters
114
- header_params = opts[:header_params] || {}
115
- # HTTP header 'Accept' (if needed)
116
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
- # HTTP header 'Content-Type'
118
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
119
-
120
- # form parameters
121
- form_params = opts[:form_params] || {}
122
-
123
- # http body (model)
124
- post_body = opts[:body] || @api_client.object_to_http_body(create_anonymous_alias_options)
125
-
126
- # return_type
127
- return_type = opts[:return_type] || 'ModelAlias'
128
-
129
- # auth_names
130
- auth_names = opts[:auth_names] || ['API_KEY']
131
-
132
- new_options = opts.merge(
133
- :header_params => header_params,
134
- :query_params => query_params,
135
- :form_params => form_params,
136
- :body => post_body,
137
- :auth_names => auth_names,
138
- :return_type => return_type
139
- )
140
-
141
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
142
- if @api_client.config.debugging
143
- @api_client.config.logger.debug "API called: AliasControllerApi#create_anonymous_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
- end
145
- return data, status_code, headers
146
- end
147
-
148
- # Delete an owned alias
86
+ # Delete an email alias
149
87
  # @param alias_id [String] aliasId
150
88
  # @param [Hash] opts the optional parameters
151
89
  # @return [nil]
@@ -154,7 +92,7 @@ module MailSlurpClient
154
92
  nil
155
93
  end
156
94
 
157
- # Delete an owned alias
95
+ # Delete an email alias
158
96
  # @param alias_id [String] aliasId
159
97
  # @param [Hash] opts the optional parameters
160
98
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -207,7 +145,7 @@ module MailSlurpClient
207
145
  # Get an email alias by ID
208
146
  # @param alias_id [String] aliasId
209
147
  # @param [Hash] opts the optional parameters
210
- # @return [ModelAlias]
148
+ # @return [AliasDto]
211
149
  def get_alias(alias_id, opts = {})
212
150
  data, _status_code, _headers = get_alias_with_http_info(alias_id, opts)
213
151
  data
@@ -217,7 +155,7 @@ module MailSlurpClient
217
155
  # Get an email alias by ID
218
156
  # @param alias_id [String] aliasId
219
157
  # @param [Hash] opts the optional parameters
220
- # @return [Array<(ModelAlias, Integer, Hash)>] ModelAlias data, response status code and response headers
158
+ # @return [Array<(AliasDto, Integer, Hash)>] AliasDto data, response status code and response headers
221
159
  def get_alias_with_http_info(alias_id, opts = {})
222
160
  if @api_client.config.debugging
223
161
  @api_client.config.logger.debug 'Calling API: AliasControllerApi.get_alias ...'
@@ -244,7 +182,7 @@ module MailSlurpClient
244
182
  post_body = opts[:body]
245
183
 
246
184
  # return_type
247
- return_type = opts[:return_type] || 'ModelAlias'
185
+ return_type = opts[:return_type] || 'AliasDto'
248
186
 
249
187
  # auth_names
250
188
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -265,7 +203,7 @@ module MailSlurpClient
265
203
  return data, status_code, headers
266
204
  end
267
205
 
268
- # Get all email aliases
206
+ # Get all email aliases you have created
269
207
  # Get all email aliases in paginated form
270
208
  # @param [Hash] opts the optional parameters
271
209
  # @option opts [Integer] :page Optional page index in alias list pagination (default to 0)
@@ -277,7 +215,7 @@ module MailSlurpClient
277
215
  data
278
216
  end
279
217
 
280
- # Get all email aliases
218
+ # Get all email aliases you have created
281
219
  # Get all email aliases in paginated form
282
220
  # @param [Hash] opts the optional parameters
283
221
  # @option opts [Integer] :page Optional page index in alias list pagination
@@ -334,22 +272,22 @@ module MailSlurpClient
334
272
  return data, status_code, headers
335
273
  end
336
274
 
337
- # Update an owned alias
275
+ # Update an email alias
338
276
  # @param alias_id [String] aliasId
339
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
277
+ # @param update_alias_options [UpdateAliasOptions] updateAliasOptions
340
278
  # @param [Hash] opts the optional parameters
341
279
  # @return [nil]
342
- def update_alias(alias_id, create_owned_alias_options, opts = {})
343
- update_alias_with_http_info(alias_id, create_owned_alias_options, opts)
280
+ def update_alias(alias_id, update_alias_options, opts = {})
281
+ update_alias_with_http_info(alias_id, update_alias_options, opts)
344
282
  nil
345
283
  end
346
284
 
347
- # Update an owned alias
285
+ # Update an email alias
348
286
  # @param alias_id [String] aliasId
349
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
287
+ # @param update_alias_options [UpdateAliasOptions] updateAliasOptions
350
288
  # @param [Hash] opts the optional parameters
351
289
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
352
- def update_alias_with_http_info(alias_id, create_owned_alias_options, opts = {})
290
+ def update_alias_with_http_info(alias_id, update_alias_options, opts = {})
353
291
  if @api_client.config.debugging
354
292
  @api_client.config.logger.debug 'Calling API: AliasControllerApi.update_alias ...'
355
293
  end
@@ -357,9 +295,9 @@ module MailSlurpClient
357
295
  if @api_client.config.client_side_validation && alias_id.nil?
358
296
  fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.update_alias"
359
297
  end
360
- # verify the required parameter 'create_owned_alias_options' is set
361
- if @api_client.config.client_side_validation && create_owned_alias_options.nil?
362
- fail ArgumentError, "Missing the required parameter 'create_owned_alias_options' when calling AliasControllerApi.update_alias"
298
+ # verify the required parameter 'update_alias_options' is set
299
+ if @api_client.config.client_side_validation && update_alias_options.nil?
300
+ fail ArgumentError, "Missing the required parameter 'update_alias_options' when calling AliasControllerApi.update_alias"
363
301
  end
364
302
  # resource path
365
303
  local_var_path = '/aliases/{aliasId}'.sub('{' + 'aliasId' + '}', CGI.escape(alias_id.to_s))
@@ -378,7 +316,7 @@ module MailSlurpClient
378
316
  form_params = opts[:form_params] || {}
379
317
 
380
318
  # http body (model)
381
- post_body = opts[:body] || @api_client.object_to_http_body(create_owned_alias_options)
319
+ post_body = opts[:body] || @api_client.object_to_http_body(update_alias_options)
382
320
 
383
321
  # return_type
384
322
  return_type = opts[:return_type]
@@ -925,6 +925,76 @@ module MailSlurpClient
925
925
  return data, status_code, headers
926
926
  end
927
927
 
928
+ # Reply to an email
929
+ # Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
930
+ # @param email_id [String] emailId
931
+ # @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
932
+ # @param [Hash] opts the optional parameters
933
+ # @return [SentEmailDto]
934
+ def reply_to_email(email_id, reply_to_email_options, opts = {})
935
+ data, _status_code, _headers = reply_to_email_with_http_info(email_id, reply_to_email_options, opts)
936
+ data
937
+ end
938
+
939
+ # Reply to an email
940
+ # Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails &#x60;to&#x60;, &#x60;cc&#x60;, and &#x60;bcc&#x60;.
941
+ # @param email_id [String] emailId
942
+ # @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
943
+ # @param [Hash] opts the optional parameters
944
+ # @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
945
+ def reply_to_email_with_http_info(email_id, reply_to_email_options, opts = {})
946
+ if @api_client.config.debugging
947
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.reply_to_email ...'
948
+ end
949
+ # verify the required parameter 'email_id' is set
950
+ if @api_client.config.client_side_validation && email_id.nil?
951
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.reply_to_email"
952
+ end
953
+ # verify the required parameter 'reply_to_email_options' is set
954
+ if @api_client.config.client_side_validation && reply_to_email_options.nil?
955
+ fail ArgumentError, "Missing the required parameter 'reply_to_email_options' when calling EmailControllerApi.reply_to_email"
956
+ end
957
+ # resource path
958
+ local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
959
+
960
+ # query parameters
961
+ query_params = opts[:query_params] || {}
962
+
963
+ # header parameters
964
+ header_params = opts[:header_params] || {}
965
+ # HTTP header 'Accept' (if needed)
966
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
967
+ # HTTP header 'Content-Type'
968
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
969
+
970
+ # form parameters
971
+ form_params = opts[:form_params] || {}
972
+
973
+ # http body (model)
974
+ post_body = opts[:body] || @api_client.object_to_http_body(reply_to_email_options)
975
+
976
+ # return_type
977
+ return_type = opts[:return_type] || 'SentEmailDto'
978
+
979
+ # auth_names
980
+ auth_names = opts[:auth_names] || ['API_KEY']
981
+
982
+ new_options = opts.merge(
983
+ :header_params => header_params,
984
+ :query_params => query_params,
985
+ :form_params => form_params,
986
+ :body => post_body,
987
+ :auth_names => auth_names,
988
+ :return_type => return_type
989
+ )
990
+
991
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
992
+ if @api_client.config.debugging
993
+ @api_client.config.logger.debug "API called: EmailControllerApi#reply_to_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
994
+ end
995
+ return data, status_code, headers
996
+ end
997
+
928
998
  # Validate email
929
999
  # Validate the HTML content of email if HTML is found. Considered valid if no HTML.
930
1000
  # @param email_id [String] ID of email
@@ -20,15 +20,14 @@ module MailSlurpClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Submit a form to be parsed and sent as an email to an address determined by the form fields
23
- # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address or a `_toAlias` email alias ID to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://api.mailslurp.com/forms?_toAlias=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
23
+ # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :_email_address Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later.
26
26
  # @option opts [String] :_redirect_to Optional URL to redirect form submitter to after submission. If not present user will see a success message.
27
27
  # @option opts [String] :_spam_check Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored.
28
28
  # @option opts [String] :_subject Optional subject of the email that will be sent.
29
29
  # @option opts [String] :_success_message Optional success message to display if no _redirectTo present.
30
- # @option opts [String] :_to The email address that submitted form should be sent to. Either this or _toAlias must be present for a form to be successfully submitted..
31
- # @option opts [String] :_to_alias ID of an email alias to that form should be sent to. Aliases must be created before submission and can be used to hide an email address and reduce spam.
30
+ # @option opts [String] :_to The email address that submitted form should be sent to.
32
31
  # @option opts [String] :other_parameters All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent.
33
32
  # @return [String]
34
33
  def submit_form(opts = {})
@@ -37,15 +36,14 @@ module MailSlurpClient
37
36
  end
38
37
 
39
38
  # Submit a form to be parsed and sent as an email to an address determined by the form fields
40
- # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a &#x60;_to&#x60; email address or a &#x60;_toAlias&#x60; email alias ID to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding &#x60;name&#x60; attributes or as URL query parameters such as &#x60;?_to&#x3D;test@example.com&#x60; The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts &#x60;application/x-www-form-urlencoded&#x60;, and &#x60;multipart/form-data&#x60; content-types. #### HTML Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://api.mailslurp.com/forms\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;input name&#x3D;\&quot;_to\&quot; type&#x3D;\&quot;hidden\&quot; value&#x3D;\&quot;test@example.com\&quot;/&gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; #### URL Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://api.mailslurp.com/forms?_toAlias&#x3D;test@example.com\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; The email address is specified by a &#x60;_to&#x60; field OR is extracted from an email alias specified by a &#x60;_toAlias&#x60; field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the &#x60;enctype&#x60; attribute, for instance: &#x60;&lt;form enctype&#x3D;\&quot;multipart/form-data\&quot;&gt;&#x60;.
39
+ # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a &#x60;_to&#x60; email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding &#x60;name&#x60; attributes or as URL query parameters such as &#x60;?_to&#x3D;test@example.com&#x60; The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts &#x60;application/x-www-form-urlencoded&#x60;, and &#x60;multipart/form-data&#x60; content-types. #### HTML Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://api.mailslurp.com/forms\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;input name&#x3D;\&quot;_to\&quot; type&#x3D;\&quot;hidden\&quot; value&#x3D;\&quot;test@example.com\&quot;/&gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; #### URL Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://api.mailslurp.com/forms?_to&#x3D;test@example.com\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; The email address is specified by a &#x60;_to&#x60; field OR is extracted from an email alias specified by a &#x60;_toAlias&#x60; field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the &#x60;enctype&#x60; attribute, for instance: &#x60;&lt;form enctype&#x3D;\&quot;multipart/form-data\&quot;&gt;&#x60;.
41
40
  # @param [Hash] opts the optional parameters
42
41
  # @option opts [String] :_email_address Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later.
43
42
  # @option opts [String] :_redirect_to Optional URL to redirect form submitter to after submission. If not present user will see a success message.
44
43
  # @option opts [String] :_spam_check Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored.
45
44
  # @option opts [String] :_subject Optional subject of the email that will be sent.
46
45
  # @option opts [String] :_success_message Optional success message to display if no _redirectTo present.
47
- # @option opts [String] :_to The email address that submitted form should be sent to. Either this or _toAlias must be present for a form to be successfully submitted..
48
- # @option opts [String] :_to_alias ID of an email alias to that form should be sent to. Aliases must be created before submission and can be used to hide an email address and reduce spam.
46
+ # @option opts [String] :_to The email address that submitted form should be sent to.
49
47
  # @option opts [String] :other_parameters All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent.
50
48
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
51
49
  def submit_form_with_http_info(opts = {})
@@ -73,7 +71,6 @@ module MailSlurpClient
73
71
  form_params['_subject'] = opts[:'_subject'] if !opts[:'_subject'].nil?
74
72
  form_params['_successMessage'] = opts[:'_success_message'] if !opts[:'_success_message'].nil?
75
73
  form_params['_to'] = opts[:'_to'] if !opts[:'_to'].nil?
76
- form_params['_toAlias'] = opts[:'_to_alias'] if !opts[:'_to_alias'].nil?
77
74
  form_params['otherParameters'] = opts[:'other_parameters'] if !opts[:'other_parameters'].nil?
78
75
 
79
76
  # http body (model)