File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,30 @@ better flexibility in that regard. Go to your _Mailtrap account_ → _Email Send
82
82
→ _ Sending Domains_ → _ Your domain_ → _ SMTP/API Settings_ to find the SMTP
83
83
configuration example.
84
84
85
+ ### Multiple Mailtrap Clients
86
+
87
+ You can configure two Mailtrap clients to operate simultaneously. This setup is
88
+ particularly useful when you need to send emails using both the transactional
89
+ and bulk APIs. Refer to the configuration example below:
90
+
91
+ ``` ruby
92
+ # config/application.rb
93
+ ActionMailer ::Base .add_delivery_method :mailtrap_bulk , Mailtrap ::ActionMailer ::DeliveryMethod
94
+
95
+ # config/environments/production.rb
96
+ config.action_mailer.delivery_method = :mailtrap
97
+ config.action_mailer.mailtrap_settings = {
98
+ api_key: ' your-api-key'
99
+ }
100
+ config.action_mailer.mailtrap_bulk_settings = {
101
+ api_key: ' your-api-key' ,
102
+ bulk: true
103
+ }
104
+
105
+ # app/mailers/foo_mailer.rb
106
+ mail(delivery_method: :mailtrap_bulk )
107
+ ```
108
+
85
109
## Migration guide v1 → v2
86
110
87
111
Change ` Mailtrap::Sending::Client ` to ` Mailtrap::Client ` .
You can’t perform that action at this time.
0 commit comments