def main():
    print "Report server starts."
    email_client = EmailSender('*****@*****.**', 'incidents', "test")
    title = 'Crisis Report on ' + str(datetime.datetime.now())
    file_name = ReportGenerator.generate_report()
    msg = "Dear officer, <br />"
    msg += "This is the incident report for the past 30 minutes. <br />"
    msg += "Regards, <br />"
    msg += "Crisis Management System Singapore"
    email_client.send_email_to("*****@*****.**", title, msg, file_name)
def send_verification_email(subscription):
    from EmailSender import EmailSender

    config = ConfigParser.ConfigParser()
    config.read(os.path.dirname(os.path.realpath(__file__)) + '/../../server.cfg')
    local_address = config.get('OS', 'subscribe')

    emailclient = EmailSender('*****@*****.**', 'incidents')
    emailclient.send_email_to(subscription.email, "Verification of Subscription", "Please click the link below to verify your registration."
                                                                                  + local_address + "verify?hash=" + subscription.email_hash)