added initial mailing logic