ark-email 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d612dc78e03726f7930429ab6d7cf9826145b9bf42d5049e8a5ecea9db3ad7b8
4
- data.tar.gz: 33a733a57efb4084871fde7e35c7913c836eecc708a40af1210171f91de390c7
3
+ metadata.gz: 8d3a8978fdd41f199bc7e58a28af1391a16974818d5c90d9df9f5813a71791d4
4
+ data.tar.gz: a6b629b835da4d3c4d22f0f8c24815b4c66fff403fa277c75b37ad3b96a0055b
5
5
  SHA512:
6
- metadata.gz: 4487eebe13f6bc9f8589ae754827ea7f0a62a9796964a1f938272f16b1dadce28b49efb4d836ab90b0d68742c2bfc3eca6b3ec4376df87255c56db9f75301dee
7
- data.tar.gz: 3f9798c5f37e08efcbdc8f6723258412fe55f91bcb1f71b7440d204d1b5800ce75acbc6b0c0e7192c73b742b3729e343013869c3758fb1e44a399f8787ef0020
6
+ metadata.gz: '015863b0e54d3d1d11984029639548ccfb21338f48272c326eab7c423e863a29fd52f13ed019ca7eca4d459f8f96f71bcb16d30a226dd7d8bebe0279fe3dda02'
7
+ data.tar.gz: 5ca9ed7396673028c3bbf88e82686a397c4f05809538961c47c1c6ba8b1d23e9b5705f8ff8238031c003ed4fcc1dafa28917f9bb61053fd76559bf5608b0450c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.0 (2026-01-23)
4
+
5
+ Full Changelog: [v0.12.0...v0.13.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.12.0...v0.13.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** fix from in Send raw MIME email ([cc449e8](https://github.com/ArkHQ-io/ark-ruby/commit/cc449e8446159fdda2c063f8ecc3c49397a5946f))
10
+ * **api:** improve raw MIME error handling ([ecbba2f](https://github.com/ArkHQ-io/ark-ruby/commit/ecbba2fe4af6f1116b4581adf8d5bfcc4be11140))
11
+
12
+ ## 0.12.0 (2026-01-23)
13
+
14
+ Full Changelog: [v0.11.0...v0.12.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.11.0...v0.12.0)
15
+
16
+ ### Features
17
+
18
+ * **api:** improve raw endpoint ([a0862f2](https://github.com/ArkHQ-io/ark-ruby/commit/a0862f2080187dcf8cdc0ab8d802849cdc9174ad))
19
+
3
20
  ## 0.11.0 (2026-01-22)
4
21
 
5
22
  Full Changelog: [v0.10.0...v0.11.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.10.0...v0.11.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "ark-email", "~> 0.11.0"
29
+ gem "ark-email", "~> 0.13.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -7,23 +7,35 @@ module ArkEmail
7
7
  extend ArkEmail::Internal::Type::RequestParameters::Converter
8
8
  include ArkEmail::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute data
11
- # Base64-encoded RFC 2822 message
10
+ # @!attribute from
11
+ # Sender email address. Must be from a verified domain.
12
+ #
13
+ # **Supported formats:**
14
+ #
15
+ # - Email only: `hello@yourdomain.com`
16
+ # - With display name: `Acme <hello@yourdomain.com>`
17
+ # - With quoted name: `"Acme Support" <support@yourdomain.com>`
18
+ #
19
+ # The domain portion must match a verified sending domain in your account.
12
20
  #
13
21
  # @return [String]
14
- required :data, String
22
+ required :from, String
15
23
 
16
- # @!attribute mail_from
17
- # Envelope sender address
24
+ # @!attribute raw_message
25
+ # Base64-encoded RFC 2822 MIME message.
26
+ #
27
+ # **You must base64-encode your raw email before sending.** The raw email should
28
+ # include headers (From, To, Subject, Content-Type, etc.) followed by a blank line
29
+ # and the message body.
18
30
  #
19
31
  # @return [String]
20
- required :mail_from, String, api_name: :mailFrom
32
+ required :raw_message, String, api_name: :rawMessage
21
33
 
22
- # @!attribute rcpt_to
23
- # Envelope recipient addresses
34
+ # @!attribute to
35
+ # Recipient email addresses
24
36
  #
25
37
  # @return [Array<String>]
26
- required :rcpt_to, ArkEmail::Internal::Type::ArrayOf[String], api_name: :rcptTo
38
+ required :to, ArkEmail::Internal::Type::ArrayOf[String]
27
39
 
28
40
  # @!attribute bounce
29
41
  # Whether this is a bounce message (accepts null)
@@ -31,12 +43,15 @@ module ArkEmail
31
43
  # @return [Boolean, nil]
32
44
  optional :bounce, ArkEmail::Internal::Type::Boolean, nil?: true
33
45
 
34
- # @!method initialize(data:, mail_from:, rcpt_to:, bounce: nil, request_options: {})
35
- # @param data [String] Base64-encoded RFC 2822 message
46
+ # @!method initialize(from:, raw_message:, to:, bounce: nil, request_options: {})
47
+ # Some parameter documentations has been truncated, see
48
+ # {ArkEmail::Models::EmailSendRawParams} for more details.
49
+ #
50
+ # @param from [String] Sender email address. Must be from a verified domain.
36
51
  #
37
- # @param mail_from [String] Envelope sender address
52
+ # @param raw_message [String] Base64-encoded RFC 2822 MIME message.
38
53
  #
39
- # @param rcpt_to [Array<String>] Envelope recipient addresses
54
+ # @param to [Array<String>] Recipient email addresses
40
55
  #
41
56
  # @param bounce [Boolean, nil] Whether this is a bounce message (accepts null)
42
57
  #
@@ -263,18 +263,23 @@ module ArkEmail
263
263
  )
264
264
  end
265
265
 
266
+ # Some parameter documentations has been truncated, see
267
+ # {ArkEmail::Models::EmailSendRawParams} for more details.
268
+ #
266
269
  # Send a pre-formatted RFC 2822 MIME message. Use this for advanced use cases or
267
270
  # when migrating from systems that generate raw email content.
268
271
  #
269
- # The `data` field should contain the base64-encoded raw email.
272
+ # **Important:** The `rawMessage` field must be base64-encoded. Your raw MIME
273
+ # message (with headers like From, To, Subject, Content-Type, followed by a blank
274
+ # line and the body) must be encoded to base64 before sending.
270
275
  #
271
- # @overload send_raw(data:, mail_from:, rcpt_to:, bounce: nil, request_options: {})
276
+ # @overload send_raw(from:, raw_message:, to:, bounce: nil, request_options: {})
272
277
  #
273
- # @param data [String] Base64-encoded RFC 2822 message
278
+ # @param from [String] Sender email address. Must be from a verified domain.
274
279
  #
275
- # @param mail_from [String] Envelope sender address
280
+ # @param raw_message [String] Base64-encoded RFC 2822 MIME message.
276
281
  #
277
- # @param rcpt_to [Array<String>] Envelope recipient addresses
282
+ # @param to [Array<String>] Recipient email addresses
278
283
  #
279
284
  # @param bounce [Boolean, nil] Whether this is a bounce message (accepts null)
280
285
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ArkEmail
4
- VERSION = "0.11.0"
4
+ VERSION = "0.13.0"
5
5
  end
@@ -11,17 +11,29 @@ module ArkEmail
11
11
  T.any(ArkEmail::EmailSendRawParams, ArkEmail::Internal::AnyHash)
12
12
  end
13
13
 
14
- # Base64-encoded RFC 2822 message
14
+ # Sender email address. Must be from a verified domain.
15
+ #
16
+ # **Supported formats:**
17
+ #
18
+ # - Email only: `hello@yourdomain.com`
19
+ # - With display name: `Acme <hello@yourdomain.com>`
20
+ # - With quoted name: `"Acme Support" <support@yourdomain.com>`
21
+ #
22
+ # The domain portion must match a verified sending domain in your account.
15
23
  sig { returns(String) }
16
- attr_accessor :data
24
+ attr_accessor :from
17
25
 
18
- # Envelope sender address
26
+ # Base64-encoded RFC 2822 MIME message.
27
+ #
28
+ # **You must base64-encode your raw email before sending.** The raw email should
29
+ # include headers (From, To, Subject, Content-Type, etc.) followed by a blank line
30
+ # and the message body.
19
31
  sig { returns(String) }
20
- attr_accessor :mail_from
32
+ attr_accessor :raw_message
21
33
 
22
- # Envelope recipient addresses
34
+ # Recipient email addresses
23
35
  sig { returns(T::Array[String]) }
24
- attr_accessor :rcpt_to
36
+ attr_accessor :to
25
37
 
26
38
  # Whether this is a bounce message (accepts null)
27
39
  sig { returns(T.nilable(T::Boolean)) }
@@ -29,20 +41,32 @@ module ArkEmail
29
41
 
30
42
  sig do
31
43
  params(
32
- data: String,
33
- mail_from: String,
34
- rcpt_to: T::Array[String],
44
+ from: String,
45
+ raw_message: String,
46
+ to: T::Array[String],
35
47
  bounce: T.nilable(T::Boolean),
36
48
  request_options: ArkEmail::RequestOptions::OrHash
37
49
  ).returns(T.attached_class)
38
50
  end
39
51
  def self.new(
40
- # Base64-encoded RFC 2822 message
41
- data:,
42
- # Envelope sender address
43
- mail_from:,
44
- # Envelope recipient addresses
45
- rcpt_to:,
52
+ # Sender email address. Must be from a verified domain.
53
+ #
54
+ # **Supported formats:**
55
+ #
56
+ # - Email only: `hello@yourdomain.com`
57
+ # - With display name: `Acme <hello@yourdomain.com>`
58
+ # - With quoted name: `"Acme Support" <support@yourdomain.com>`
59
+ #
60
+ # The domain portion must match a verified sending domain in your account.
61
+ from:,
62
+ # Base64-encoded RFC 2822 MIME message.
63
+ #
64
+ # **You must base64-encode your raw email before sending.** The raw email should
65
+ # include headers (From, To, Subject, Content-Type, etc.) followed by a blank line
66
+ # and the message body.
67
+ raw_message:,
68
+ # Recipient email addresses
69
+ to:,
46
70
  # Whether this is a bounce message (accepts null)
47
71
  bounce: nil,
48
72
  request_options: {}
@@ -52,9 +76,9 @@ module ArkEmail
52
76
  sig do
53
77
  override.returns(
54
78
  {
55
- data: String,
56
- mail_from: String,
57
- rcpt_to: T::Array[String],
79
+ from: String,
80
+ raw_message: String,
81
+ to: T::Array[String],
58
82
  bounce: T.nilable(T::Boolean),
59
83
  request_options: ArkEmail::RequestOptions
60
84
  }
@@ -276,23 +276,37 @@ module ArkEmail
276
276
  # Send a pre-formatted RFC 2822 MIME message. Use this for advanced use cases or
277
277
  # when migrating from systems that generate raw email content.
278
278
  #
279
- # The `data` field should contain the base64-encoded raw email.
279
+ # **Important:** The `rawMessage` field must be base64-encoded. Your raw MIME
280
+ # message (with headers like From, To, Subject, Content-Type, followed by a blank
281
+ # line and the body) must be encoded to base64 before sending.
280
282
  sig do
281
283
  params(
282
- data: String,
283
- mail_from: String,
284
- rcpt_to: T::Array[String],
284
+ from: String,
285
+ raw_message: String,
286
+ to: T::Array[String],
285
287
  bounce: T.nilable(T::Boolean),
286
288
  request_options: ArkEmail::RequestOptions::OrHash
287
289
  ).returns(ArkEmail::Models::EmailSendRawResponse)
288
290
  end
289
291
  def send_raw(
290
- # Base64-encoded RFC 2822 message
291
- data:,
292
- # Envelope sender address
293
- mail_from:,
294
- # Envelope recipient addresses
295
- rcpt_to:,
292
+ # Sender email address. Must be from a verified domain.
293
+ #
294
+ # **Supported formats:**
295
+ #
296
+ # - Email only: `hello@yourdomain.com`
297
+ # - With display name: `Acme <hello@yourdomain.com>`
298
+ # - With quoted name: `"Acme Support" <support@yourdomain.com>`
299
+ #
300
+ # The domain portion must match a verified sending domain in your account.
301
+ from:,
302
+ # Base64-encoded RFC 2822 MIME message.
303
+ #
304
+ # **You must base64-encode your raw email before sending.** The raw email should
305
+ # include headers (From, To, Subject, Content-Type, etc.) followed by a blank line
306
+ # and the message body.
307
+ raw_message:,
308
+ # Recipient email addresses
309
+ to:,
296
310
  # Whether this is a bounce message (accepts null)
297
311
  bounce: nil,
298
312
  request_options: {}
@@ -1,38 +1,33 @@
1
1
  module ArkEmail
2
2
  module Models
3
3
  type email_send_raw_params =
4
- {
5
- data: String,
6
- mail_from: String,
7
- rcpt_to: ::Array[String],
8
- bounce: bool?
9
- }
4
+ { from: String, raw_message: String, to: ::Array[String], bounce: bool? }
10
5
  & ArkEmail::Internal::Type::request_parameters
11
6
 
12
7
  class EmailSendRawParams < ArkEmail::Internal::Type::BaseModel
13
8
  extend ArkEmail::Internal::Type::RequestParameters::Converter
14
9
  include ArkEmail::Internal::Type::RequestParameters
15
10
 
16
- attr_accessor data: String
11
+ attr_accessor from: String
17
12
 
18
- attr_accessor mail_from: String
13
+ attr_accessor raw_message: String
19
14
 
20
- attr_accessor rcpt_to: ::Array[String]
15
+ attr_accessor to: ::Array[String]
21
16
 
22
17
  attr_accessor bounce: bool?
23
18
 
24
19
  def initialize: (
25
- data: String,
26
- mail_from: String,
27
- rcpt_to: ::Array[String],
20
+ from: String,
21
+ raw_message: String,
22
+ to: ::Array[String],
28
23
  ?bounce: bool?,
29
24
  ?request_options: ArkEmail::request_opts
30
25
  ) -> void
31
26
 
32
27
  def to_hash: -> {
33
- data: String,
34
- mail_from: String,
35
- rcpt_to: ::Array[String],
28
+ from: String,
29
+ raw_message: String,
30
+ to: ::Array[String],
36
31
  bounce: bool?,
37
32
  request_options: ArkEmail::RequestOptions
38
33
  }
@@ -54,9 +54,9 @@ module ArkEmail
54
54
  ) -> ArkEmail::Models::EmailSendBatchResponse
55
55
 
56
56
  def send_raw: (
57
- data: String,
58
- mail_from: String,
59
- rcpt_to: ::Array[String],
57
+ from: String,
58
+ raw_message: String,
59
+ to: ::Array[String],
60
60
  ?bounce: bool?,
61
61
  ?request_options: ArkEmail::request_opts
62
62
  ) -> ArkEmail::Models::EmailSendRawResponse
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ark-email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-22 00:00:00.000000000 Z
11
+ date: 2026-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi