MandrillAdmin::getDomainFromHost() guesses `.co.nz` not `domain.co.nz`
tractorcow opened this issue · 3 comments
tractorcow commented
As per title. This doesn't handle cases where TLD has more than 1 part. :)
lekoala commented
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.
tractorcow commented
I'm going to add a feature that lets you set MANDRILL_DOMAIN
directly via .env
.
tractorcow commented
Included in #32