added mailer

Automated email script
Bug fix

fixed SSL error.