How to use the aiosmtplib.SMTPNotSupported function in aiosmtplib

To help you get started, we’ve selected a few aiosmtplib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cole / aiosmtplib / tests / test_commands.py View on Github external
async def test_expn_smtputf8_not_supported(smtp_client, smtpd_server):
    utf8_list = "tést-lïst"
    async with smtp_client:
        with pytest.raises(SMTPNotSupported):
            await smtp_client.expn(utf8_list, options=["SMTPUTF8"])
github cole / aiosmtplib / tests / test_commands.py View on Github external
async def test_vrfy_smtputf8_not_supported(smtp_client, smtpd_server):
    async with smtp_client:
        with pytest.raises(SMTPNotSupported):
            await smtp_client.vrfy("tést@exåmple.com", options=["SMTPUTF8"])
github cole / aiosmtplib / tests / test_sendmail.py View on Github external
async def test_send_message_smtputf8_not_supported(smtp_client, smtpd_server, message):
    message["To"] = "reçipïént2@exåmple.com"

    async with smtp_client:
        with pytest.raises(SMTPNotSupported):
            await smtp_client.send_message(message)
github cole / aiosmtplib / tests / test_errors.py View on Github external
def test_raise_smtp_not_supported(message):
    with pytest.raises(SMTPNotSupported) as excinfo:
        raise SMTPNotSupported(message)

    assert issubclass(excinfo.type, SMTPException)
    assert excinfo.value.message == message
github cole / aiosmtplib / tests / test_errors.py View on Github external
def test_raise_smtp_not_supported(message):
    with pytest.raises(SMTPNotSupported) as excinfo:
        raise SMTPNotSupported(message)

    assert issubclass(excinfo.type, SMTPException)
    assert excinfo.value.message == message