Open AndrewHaine opened 5 years ago
Can you just use SMTP instead of the API?
Unfortunately not, our hosting provider doesn't allow for outbound smtp so we use Mailgun instead.
Problem is some of our mailgun domains are set up in the EU region. We could switch them over to the non-EU region and reverify the dns with mailgun (we have done this in the past) but it might be nice to have the option to configure the region from the CMS/Statamic settings.
This is a tricky request.
We've moved away from direct integrations in core and prefer to rely on adapters, interfaces, and other abstraction patterns to allow for more portable solutions not directly tied to specific third-party integrations (e.g. Mailgun API). SMTP is the most flexible option and is the preferred method for all email integration because every single transactional email provider supports it.
Given that we're putting all of our effort into finishing Statamic 3, I don't know what we'll be able to put time into this type of feature request unless it was sponsored, and even then we may contract the work out. Is that a possibility for you?
Is your feature request related to a problem? Please describe. Mailgun requires you to
POST
to a different API endpoint if your domain is set up as an EU domain, attempting to send a request to the standard endpoint currently results in a 404 response:Describe the solution you'd like One possibility would be to have a new config option for the 'domain region' in the email settings (Which would then get passed as an additional parameter in the
MailgunTransport
constructor). Then when the domain is set the appropriate endpoint is chosen for the URL:Non-EU domains:
EU domains: