Negotiation/ForceTlsUpgradeNegotiation.php

genkgo/mail · src/Protocol/Smtp/Negotiation/ForceTlsUpgradeNegotiation.php · php · MIT
email

SMTP negotiation that forces STARTTLS upgrade for secure connections.

// Source: https://github.com/genkgo/mail | License: MIT | Copyright 2017 Genkgo
// Provided via justclaw.it.com; keep this notice with the code.
<?php
declare(strict_types=1);

namespace Genkgo\Mail\Protocol\Smtp\Negotiation;

use Genkgo\Mail\Exception\AssertionFailedException;
use Genkgo\Mail\Exception\ConnectionInsecureException;
use Genkgo\Mail\Protocol\ConnectionInterface;
use Genkgo\Mail\Protocol\Smtp\Client;
use Genkgo\Mail\Protocol\Smtp\NegotiationInterface;
use Genkgo\Mail\Protocol\Smtp\Request\EhloCommand;
use Genkgo\Mail\Protocol\Smtp\Request\HeloCommand;
use Genkgo\Mail\Protocol\Smtp\Request\StartTlsCommand;
use Genkgo\Mail\Protocol\Smtp\Response\EhloResponse;

final class ForceTlsUpgradeNegotiation implements NegotiationInterface
{
    /**
     * @var ConnectionInterface
     

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key