lekoala/silverstripe-mandrill

MandrillAdmin::getDomainFromHost() guesses `.co.nz` not `domain.co.nz`

tractorcow opened this issue · 3 comments

As per title. This doesn't handle cases where TLD has more than 1 part. :)

well, getDomainFromHost is really a naive method that is more of a fallback than something you should really rely on. It's only called if getDomainFromEmail fails, which is not very likely (if you defined an admin_email for instance, it will work just fine since we extract the part after @)

Otherwise we need to add some other dependency like https://github.com/jeremykendall/php-domain-parser which is maybe a bit overkill for the given usage.

I'm going to add a feature that lets you set MANDRILL_DOMAIN directly via .env.

Included in #32