Migrating to V3 (recommended version) + cleanup + improvement
Migrating to V3 (recommended version) + cleanup + improvement

I took liberty and slightly cleaned up code.
The signature of request method provides body as a callback response , i thought it'd be cleaner this way.
In case API returns a different HTTP code (which is possible ,e.g. service unavailable ).

Also public API key sometimes used by a lot of newbies behaves oddly and comes back with nothing at all.
Added timeout of 1.5 seconds (reasonable) , mailgun is normally sub 500ms , you wouldn't want 20seconds or more to wait for this (which is linux default).
diasdavid/mailgun-validate-email