def METHOD_NAME(srv, mocker, caplog):
    """
    Verify the outcome of the service plugin when SMTP submission fails.
    """
    module = load_module_from_file("mqttwarn/services/smtp.py")
    item = Item(
        config={
            "server": "localhost:25",
            "sender": "mqttwarn <mqttwarn@localhost>",
            "username": "foobar",
            "password": "bazqux",
            "starttls": True,
            "htmlmsg": True,
        },
        target="test",
        addrs=["foo@example.org", "bar@example.org"],
        message="⚽ Notification message ⚽",
    )
    item = Struct(**item.asdict())
    mocker.patch("smtplib.SMTP", create=True, side_effect=TimeoutError("Something failed"))
    outcome = module.plugin(srv, item)
    assert outcome is False
    assert (
        "Error sending notification to SMTP recipient test, addresses: "
        "['foo@example.org', 'bar@example.org']. Exception: Something failed" in caplog.messages
    )