Add mail sending code, not used yet.