"""sendEmail This module has the function called by /MG/comunication/sendEmail Service to send emails """ from monitorT.task import Task from MG.tools.comunication.emails import * class TaskCustom(Task): """ Custom Task """ CONTROL = False def post(task, user=None, receiver_email=None, subject=None, text_type=None, contain=None): """ Service to send an email Parameters ---------- task user receiver_email:str user who received the email subject: str subject of email to send text_type: str text contain: str contain of email Returns ------- None """ try: email = sendEmail(receiver_email=receiver_email, subject=subject, text_type=text_type, contain=contain) return email except Exception as e: raise e POST_REQUEST = { 'function': post }