functional mail sending