You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+1. According to Mailgun guides, it's better to send transactional e-mails (reset password, billing statements, etc.) and marketing e-mails (SPAM) through different domains/subdomains. We'd like to start sending e-mails from multiple domains, and support for dynamic domains would be crucial. My proposals:
A convenient option. If From is set to [email protected], Mailgun domain is set to abc.def.com and /v3/abc.def.com end-point is used.
config.mailgun_settings[:domain]=:auto
A flexible option. Do it yourself in run-time.
config.mailgun_settings[:domain]=procdo |message|
# Some code here that returns the domain used to send this very e-mail.# The object provided lets me access From, Subject, body etc.end
Although these are two different options, both would use the same mechanism internally. If :domain is set to :auto, the code runs its default proc that takes out the domain from the From field.
Is it possible to change the domain when sending email?
The text was updated successfully, but these errors were encountered: