def _post_sendgrid_mail(mail_data: Dict) -> None:
    sendgrid_client = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
    response = sendgrid_client.client.mail.send.post(request_body=mail_data)
    if (200 <= response.status_code < 300):
        log.info('Email with subject %s is successfully sent to recipients: %s', mail_data['subject'], mail_data['personalizations'])
    else:
        log.error('Failed to send out email with subject %s, status code: %s', mail_data['subject'], response.status_code)
def _post_sendgrid_mail(mail_data: Dict) -> None:
    sendgrid_client = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
    response = sendgrid_client.client.mail.send.post(request_body=mail_data)
    if (200 <= response.status_code < 300):
        log.info('Email with subject %s is successfully sent to recipients: %s', mail_data['subject'], mail_data['personalizations'])
    else:
        log.error('Failed to send out email with subject %s, status code: %s', mail_data['subject'], response.status_code)