@classmethod
    def sendMail(cls, subject, body, toAddress, ccAddress='',
                 fromAddress='puliserver', SMTPhost='aspmx.l.google.com', verbose=False):
        import smtplib
        from email.mime.text import MIMEText

        msg = MIMEText(body)
        msg['Subject'] = subject
        msg['From'] = fromAddress
        msg['To'] = toAddress
        msg['Cc'] = ccAddress

        recipients = toAddress.split(',')
        recipients.extend(ccAddress.split(','))

        try:
            s = smtplib.SMTP(SMTPhost)
            s.sendmail(fromAddress, recipients, msg.as_string())
            s.quit()
        except Exception, e:
            print "Error using sendmail, probably malformed email addresses."
            raise Exception("Error using sendmail: %r" % e)

        if verbose:
            print "Email summary info"
            print "  from.....: %r" % fromAddress
            print "  to.......: %r" % toAddress
            print "  cc.......: %r" % ccAddress
            print "  subject..: %r" % subject
            print "  body.....: %r" % body
Called when a ticket is created.
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/puliclient/runner.py/RunnerToolkit.sendMail--crossover with--dataset/ETHPy150Open zulip/zulip/api/integrations/trac/zulip_trac.py/ZulipPlugin.ticket_created