Mail endpoint

Implements mail sending as an endpoint.