protected function getAttachmentFileName($originalAttachmentFileName, $baseOutputFolder)
    {
        // Getting extension from original file name
        $pathInfo = pathinfo($originalAttachmentFileName);
        $extension = '';
        if (isset($pathInfo['extension'])) {
            $extension = $pathInfo['extension'];
        }
        // Returning the attachment file name (output folder + message sub folder + message attachment sub folder
        // + original attachment file name + current object string representation + timestamp + extension)
        $attachmentFileName = sprintf(
            "%s%s%s_%s_%s.%s",
            $this->getAttachmentFileFolder($baseOutputFolder),
            DIRECTORY_SEPARATOR,
            $pathInfo['filename'],
            $this->toString(),
            time(),
            $extension
        );
        return rtrim($attachmentFileName, '.');
    }