def send_event_publish(email, event_name, link):
 message_settings = MessageSettings.query.filter_by(action=NEXT_EVENT).first()
 if ((not message_settings) or (message_settings.mail_status == 1)):
  send_email(to=email, action=NEXT_EVENT, subject=MAILS[EVENT_PUBLISH]['subject'].format(event_name=event_name), html=MAILS[EVENT_PUBLISH]['message'].format(email=str(email), event_name=str(event_name), link=link))

def send_event_publish ( email , event_name , link ) : message_settings = MessageSettings . query . filter_by ( action = NEXT_EVENT ) . first ( ) if ( ( not message_settings ) or ( message_settings . mail_status == 1 ) ) : send_email ( to = email , action = NEXT_EVENT , subject = MAILS [ EVENT_PUBLISH ] [ 'subject' ] . format ( event_name = event_name ) , html = MAILS [ EVENT_PUBLISH ] [ 'message' ] . format ( email = str ( email ) , event_name = str ( event_name ) , link = link ) )
send email on publishing event .