src/Entity/Attachment.php
public function getId()
    {
        if (is_null($this->id)) {
            $this->id = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true)) . '@mailer.generated';
        }

        return $this->id;
    }
public function getId()
    {
        if (is_null($this->id)) {
            $this->id = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true)) . '@mailer.generated';
        }

        return $this->id;
    }
public function getId ( ) { if ( is_null ( $ this -> id ) ) { $ this -> id = md5 ( getmypid ( ) . '.' . time ( ) . '.' . uniqid ( mt_rand ( ) , true ) ) . '@mailer.generated' ; } return $ this -> id ; }
Get attachment ID

@return string
Get attachment ID