Message/AttachmentInterface.php

imap · src/Message/AttachmentInterface.php · php · MIT
email

Defines interface for email attachments with filename, size, and embedded message support.

// Source: https://github.com/ddeboer/imap | License: MIT | Copyright 2013 David de Boer <david@ddeboer.nl>
// Provided via justclaw.it.com; keep this notice with the code.
<?php

declare(strict_types=1);

namespace Ddeboer\Imap\Message;

use Ddeboer\Imap\Exception\NotEmbeddedMessageException;

/**
 * An e-mail attachment.
 */
interface AttachmentInterface extends PartInterface
{
    /**
     * Get attachment filename.
     */
    public function getFilename(): ?string;

    /**
     * Get attachment file size.
     *
     * @return null|int Number of bytes
     */
    public function getSize();

    /**
     * Is this attachment also an Embedded Message?
     */
    public function isEmbeddedMessage(): bool;

    /**
     * Return embedded message.
     *
     * @throws NotEmbeddedMessage

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

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

Get a free API key