public function addMessage(string $message, string $options = null, DateTimeInterface $internalDate = null): bool
    {
        $arguments = [
            $this->resource->getStream(),
            $this->getFullEncodedName(),
            $message,
        ];
        if (null !== $options) {
            $arguments[] = $options;
            if (null !== $internalDate) {
                $arguments[] = $internalDate->format('d-M-Y H:i:s O');
            }
        }

        return \imap_append(...$arguments);
    }
public function addMessage(string $message, string $options = null, DateTimeInterface $internalDate = null): bool
    {
        $arguments = [
            $this->resource->getStream(),
            $this->getFullEncodedName(),
            $message,
        ];
        if (null !== $options) {
            $arguments[] = $options;
            if (null !== $internalDate) {
                $arguments[] = $internalDate->format('d-M-Y H:i:s O');
            }
        }

        return \imap_append(...$arguments);
    }
public function addMessage ( string $ message , string $ options = null , DateTimeInterface $ internalDate = null ) : bool { $ arguments = [ $ this -> resource -> getStream ( ) , $ this -> getFullEncodedName ( ) , $ message , ] ; if ( null !== $ options ) { $ arguments [ ] = $ options ; if ( null !== $ internalDate ) { $ arguments [ ] = $ internalDate -> format ( 'd-M-Y H:i:s O' ) ; } } return \ imap_append ( ... $ arguments ) ; }
Add a message to the mailbox.

@param string                 $message
@param null|string            $options
@param null|DateTimeInterface $internalDate

@return bool
Add a message to the mailbox .