Inbound Email Exception Handler (Turn/InboundEmailAnswered.php)

synaplan · backend/src/Service/Email/Turn/InboundEmailAnswered.php · php · Apache-2.0
email, lang:php, tag:exception, tag:backend

A runtime exception used to handle and report status for inbound emails that cannot be processed due to invalid payloads or system limits.

// Source: https://github.com/metadist/synaplan | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
<?php

declare(strict_types=1);

namespace App\Service\Email\Turn;

/**
 * An inbound email the intake answers without a turn: an invalid payload, a
 * redelivery, a refused sender or a spent limit. Carries the JSON answer and
 * the HTTP status the relay reads.
 */
final class InboundEmailAnswered extends \RuntimeException
{
    /**
     * @param array<string, mixed> $payload
     */
    private function __construct(
        public readonly array $payload,
        public readonly int $httpStatus,
    ) {
        parent::__construct(sprintf('Inbound email answered by the intake (%d)', $

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

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

Get a free API key