mailslurp_client 15.5.1 → 15.5.2

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: 0025e93c1ea051a036c283ea13400f9f3264a169aaa426d57d4f6a773084ff58
4
- data.tar.gz: f02ad0898de31664e0f98f671636c2d4ae1a3be125155b76005a44ea4203afba
3
+ metadata.gz: 0c9171bccfe1e83210f450ee2e34045c36cd07b714206b36f100da039158dfa2
4
+ data.tar.gz: 00c12a8945b4bbc587fdb98432e619cc42211c9520b09e54f261d1068b3fba53
5
5
  SHA512:
6
- metadata.gz: b183d0e4ddca5829ab295f4c8e0dac034eec294800f16d3d138dbbc4093e3d0e3a14fb3ece126c168765e5b80670bc6fd075356572c93dcf86dd3fb95d8a9a9b
7
- data.tar.gz: 0d38552fe49aa707bb209f6da41a5ba199c37f73f905086659626999677f432141e95adb8222ce6bfa128d5e6610ed01e68e50f0500bd6c9fdcc4121f9f5801a
6
+ metadata.gz: 45c2815742a9e44046e3d1d60fa0a6906cdc5ac64455c13a2d2d5113d600cc8fde423fcb7a55dd61c4e530fa08e62c72bf39c7a96fe88d9e8e4e9e2f3832d1e6
7
+ data.tar.gz: 05a457424af810de2ed703aaeb67e2ec1bad3bbb07116e5283f84829c6724d7df26dfcfe179b39f32fcf41f8ddc16ebe4a10948bc3ecd44b65dddbaa7afdafb6
data/README.md CHANGED
@@ -9,6 +9,8 @@ MailSlurp is an email API service that lets you create real email addresses in c
9
9
  - [Method Documentation](https://www.mailslurp.com/docs/ruby/docs/)
10
10
  - [Gem Package](https://rubygems.org/gems/mailslurp_client)
11
11
  - [Github Source](https://github.com/mailslurp/mailslurp-client-ruby)
12
+ - [SMTP access details](https://www.mailslurp.com/guides/smtp-imap/)
13
+ - [Send email in Ruby with SMTP](https://www.mailslurp.com/smtp/ruby-send-email-smtp/)
12
14
 
13
15
  ### Common controllers
14
16
 
@@ -133,6 +135,46 @@ end
133
135
 
134
136
  Inboxes can be either `SMTP` or `HTTP` type. Set the inbox type using the `inboxType` property. SMTP inboxes are handled by a custom mailserver and support a wide range of clients while HTTP inboxes use Amazon SES and don't support some older clients like Outlook. SMTP inboxes are recommended for public facing email addresses while HTTP inboxes are best for application testing. Please see the guide on [types of inboxes](https://www.mailslurp.com/guides/smtp-vs-http-email-inboxes/) for more information.
135
137
 
138
+
139
+ ### Configure NET/SMTP access
140
+ SMTP type inboxes allow SMTP and IMAP access using unique host, port, password, and username. Use the `inbox_controller.get_imap_smtp_access` method to access SMTP credentials. Then configure `net/smtp` in Ruby to send email using SMTP.
141
+
142
+ ```ruby
143
+ it 'can send email using SMTP' do
144
+ inbox_controller = MailSlurpClient::InboxControllerApi.new
145
+
146
+ # create two inboxes
147
+ inbox1 = inbox_controller.create_inbox_with_options({ inboxType: 'SMTP_INBOX' })
148
+ inbox2 = inbox_controller.create_inbox
149
+
150
+ expect(inbox1.email_address).to include('@mailslurp.mx')
151
+
152
+ # get smtp access for inbox
153
+ smtp_access = inbox_controller.get_imap_smtp_access({ inbox_id: inbox1.id })
154
+
155
+ # compose email
156
+ message = <<~MESSAGE_END
157
+ From: #{inbox1.email_address}
158
+ To: #{inbox2.email_address}
159
+ Subject: Test smtp email
160
+
161
+ This is a test
162
+ MESSAGE_END
163
+
164
+ # configure SMTP with host port and "PLAIN" authentication
165
+ Net::SMTP.start(smtp_access.smtp_server_host, smtp_access.smtp_server_port, 'greeting.your.domain',
166
+ smtp_access.smtp_username, smtp_access.smtp_password, :plain) do |smtp|
167
+ # send email
168
+ smtp.send_message message, inbox1.email_address, inbox2.email_address
169
+ end
170
+
171
+ # now confirm email was sent
172
+ wait_for_controller = MailSlurpClient::WaitForControllerApi.new
173
+ email = wait_for_controller.wait_for_latest_email({ inbox_id: inbox2.id })
174
+ expect(email.subject).to include("Test smtp email")
175
+ end
176
+ ```
177
+
136
178
  ### List inboxes
137
179
 
138
180
  Inboxes you create can be listed in a paginated way using the [InboxController](https://www.mailslurp.com/docs/ruby/docs/InboxControllerApi/)).
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '15.5.1'
14
+ VERSION = '15.5.2'
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailslurp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.5.1
4
+ version: 15.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-24 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create emails addresses in Ruby then send and receive real emails and
14
14
  attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.