def METHOD_NAME(cls, payload):
    if mail_user == "ulricqin" and mail_pass == "password":
        print("invalid smtp configuration")
        return
    users = payload.get('event').get("notify_users_obj")
    emails = {}
    for u in users:
        if u.get("email"):
            emails[u.get("email")] = 1
    if not emails:
        return
    recipients = emails.keys()
    mail_body = payload.get('tpls').get("email.tpl", "email.tpl not found")
    message = MIMEText(mail_body, 'html', 'utf-8')
    message['From'] = mail_from
    message['To'] = ", ".join(recipients)
    message["Subject"] = payload.get('tpls').get("subject.tpl", "subject.tpl not found")
    try:
        smtp = smtplib.SMTP_SSL(mail_host, mail_port)
        smtp.login(mail_user, mail_pass)
        smtp.sendmail(mail_from, recipients, message.as_string())
        smtp.close()
    except smtplib.SMTPException, error:
        print(error)