def send_email_for_event_role_invite(email, role, event, link):
 message_settings = MessageSettings.query.filter_by(action=EVENT_ROLE).first()
 if ((not message_settings) or (message_settings.mail_status == 1)):
  subject = MAILS[EVENT_ROLE]['subject'].format(role=role, event=event)
  message = MAILS[EVENT_ROLE]['message'].format(email=email, role=role, event=event, link=link)
  send_email(to=email, action=EVENT_ROLE, subject=subject, html=message)

def send_email_for_event_role_invite ( email , role , event , link ) : message_settings = MessageSettings . query . filter_by ( action = EVENT_ROLE ) . first ( ) if ( ( not message_settings ) or ( message_settings . mail_status == 1 ) ) : subject = MAILS [ EVENT_ROLE ] [ 'subject' ] . format ( role = role , event = event ) message = MAILS [ EVENT_ROLE ] [ 'message' ] . format ( email = email , role = role , event = event , link = link ) send_email ( to = email , action = EVENT_ROLE , subject = subject , html = message )
send email to users for event role invites .