Sending Mails Using Apache Ant MailTask. I spent a few hours to get the Ant MailTask running “Post compile” from within eclipse . Here it gets done in more or less four steps..