implement mailgun functionality in the front-end