goodmail 0.3.0 → 0.3.1
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +33 -0
- data/lib/goodmail/configuration.rb +1 -0
- data/lib/goodmail/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c91c844f486384162c36ae455e8c41cd282930c6e8e61a8f43ba549a32dbc76d
|
|
4
|
+
data.tar.gz: c7f26ef1b5f58f3803d6611dd9401eea9a150b9dc5f05e9b60a4732114361493
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2c869d81f688f83d04c3fe06060225c60284d9911be34d53a34a8e8fa533c43e241c0a963eee4b2d5459ea7f65aed49dccf77ef4fb3166f444a0a4592dcc697
|
|
7
|
+
data.tar.gz: ff185729ddc066578ee712009ce27ddd36111fbe6ec8331c0fbb62fe59bfd622a329aa9aa0f92ba71905e9c3cc7e8f6207056196a2bc0353bf922873aa61ec4f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -234,6 +234,39 @@ end
|
|
|
234
234
|
* **Purpose**: `Goodmail.render` is primarily for generating and retrieving processed email content parts. `Goodmail.compose` is for generating a complete, deliverable `Mail::Message` object.
|
|
235
235
|
* **List-Unsubscribe Header**: `Goodmail.render` itself does *not* add the `List-Unsubscribe` header to any mail object (as it doesn't create one). If you use `Goodmail.render`, you are responsible for adding this header to your `Mail::Message` object if an `unsubscribe_url` was effectively used during rendering (either passed to `Goodmail.render` or taken from global config) and you require this header. The internal `Goodmail::Mailer` (used by `Goodmail.compose`) handles adding this header automatically to the `Mail::Message` object it builds.
|
|
236
236
|
|
|
237
|
+
### Integrating with the Pay Gem
|
|
238
|
+
|
|
239
|
+
Goodmail works seamlessly with the [Pay gem](https://github.com/pay-rails/pay) to send beautiful transactional emails for payment notifications (receipts, refunds, subscription updates, etc.).
|
|
240
|
+
|
|
241
|
+
Since Pay allows you to configure a custom mailer class, you can create a mailer that uses `Goodmail.render` to generate beautiful email content for all Pay notifications.
|
|
242
|
+
|
|
243
|
+
**Quick Setup:**
|
|
244
|
+
|
|
245
|
+
1. Copy the example mailer from [`examples/pay_goodmail_mailer.rb`](examples/pay_goodmail_mailer.rb) to your Rails app at `app/mailers/pay_goodmail_mailer.rb`
|
|
246
|
+
|
|
247
|
+
2. Configure Pay to use the custom mailer in `config/initializers/pay.rb`:
|
|
248
|
+
|
|
249
|
+
```ruby
|
|
250
|
+
Pay.setup do |config|
|
|
251
|
+
config.parent_mailer = "ApplicationMailer"
|
|
252
|
+
config.mailer = "PayGoodmailMailer"
|
|
253
|
+
# ... other Pay configuration
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
3. Customize the email content and URLs in the mailer to match your app
|
|
258
|
+
|
|
259
|
+
The example implementation includes all Pay notification types:
|
|
260
|
+
- `receipt` - Payment receipts
|
|
261
|
+
- `refund` - Refund confirmations
|
|
262
|
+
- `subscription_renewing` - Renewal reminders
|
|
263
|
+
- `payment_action_required` - Payment action needed
|
|
264
|
+
- `subscription_trial_will_end` - Trial ending soon
|
|
265
|
+
- `subscription_trial_ended` - Trial has ended
|
|
266
|
+
- `payment_failed` - Failed payment alerts
|
|
267
|
+
|
|
268
|
+
Each method uses `Goodmail.render` to create beautiful, consistent emails that match your brand.
|
|
269
|
+
|
|
237
270
|
### Adding Unsubscribe Functionality
|
|
238
271
|
|
|
239
272
|
Goodmail helps you add the `List-Unsubscribe` header and an optional visible link, but **you must provide the actual URL** where users can unsubscribe.
|
data/lib/goodmail/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: goodmail
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- rameerez
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-02-25 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|