def METHOD_NAME(email_info: dict, token: str) -> dict:  # pylint: disable=too-many-locals, , too-many-branches
    """Build the email for Registration notification."""
    logger.debug('registration_notification: %s', email_info)
    # get template and fill in parts
    filing_type, status = email_info['type'], email_info['option']
    # get template vars from filing
    filing, business, leg_tmz_filing_date, leg_tmz_effective_date = get_filing_info(email_info['filingId'])
    filing_name = filing.filing_type[0].upper() + ' '.join(re.findall('[a-zA-Z][^A-Z]*', filing.filing_type[1:]))
    business = business if business else filing.json['filing']['registration']['business']
    identifier = business.get('identifier')
    name_request = filing.json['filing']['registration']['nameRequest']
    corp_type = CorpType.find_by_id(name_request.get('legalType'))
    template = Path(
        f'{current_app.config.get("TEMPLATE_PATH")}/REG-{status}.html'
    ).read_text()
    filled_template = substitute_template_parts(template)
    # render template with vars
    jnja_template = Template(filled_template, autoescape=True)
    filing_data = (filing.json)['filing'][f'{filing_type}']
    html_out = jnja_template.render(
        business=business,
        filing=filing_data,
        header=(filing.json)['filing']['header'],
        filing_date_time=leg_tmz_filing_date,
        effective_date_time=leg_tmz_effective_date,
        entity_dashboard_url=current_app.config.get('DASHBOARD_URL') + identifier,
        email_header=filing_name.upper(),
        filing_type=filing_type,
        status=status,
        entityDescription=corp_type.full_desc if corp_type else ''
    )
    # get attachments
    pdfs = _get_pdfs(status, token, business, filing, leg_tmz_filing_date, leg_tmz_effective_date)
    # get recipients
    recipients = []
    for party in filing.filing_json['filing']['registration']['parties']:
        for role in party['roles']:
            if role['roleType'] == 'Completing Party':
                recipients.append(party['officer'].get('email'))
                break
    if status == Filing.Status.COMPLETED.value:
        recipients.append(filing.filing_json['filing']['registration']['contactPoint']['email'])
        for party in filing.filing_json['filing']['registration']['parties']:
            for role in party['roles']:
                if role['roleType'] in ('Partner', 'Proprietor'):
                    recipients.append(party['officer'].get('email'))
                    break
    recipients = list(set(recipients))
    recipients = ', '.join(filter(None, recipients)).strip()
    # assign subject
    if status == Filing.Status.PAID.value:
        subject = 'Confirmation of Filing from the Business Registry'
    elif status == Filing.Status.COMPLETED.value:
        subject = 'Registration Documents from the Business Registry'
    if not subject:  # fallback case - should never happen
        subject = 'Notification from the BC Business Registry'
    legal_name = name_request.get('legalName', None)
    subject = f'{legal_name} - {subject}' if legal_name else subject
    return {
        'recipients': recipients,
        'requestBy': 'BCRegistries@gov.bc.ca',
        'content': {
            'subject': subject,
            'body': f'{html_out}',
            'attachments': pdfs
        }
    }