import smtplib


def sendEmail(
    sendAddr: str,
    password: str,
    recvAddr: str,
    body: str,
    server: str,
    port: int,
    sub: str = "No Subject",
) -> bool:
    """Sends an email using given arguments"""
    with smtplib.SMTP(server, port) as smtp:
        smtp.ehlo()
        smtp.starttls()
        smtp.ehlo()

        smtp.login(sendAddr, password)

        subMsg: str = "Subject: {}".format(sub)
        bodyMsg: str = "\n\n {}".format(body)

        finalMsg: str = subMsg + bodyMsg

        smtp.sendmail(sendAddr, recvAddr, finalMsg)
        return True