protected function createAttachmentViaPath($file)
{
/** @var $byteStream \Swift_ByteStream_FileByteStream */
$byteStream = $this->getManager()->getDI()->get('\\Swift_ByteStream_FileByteStream', [$file]);
/** @var $image \Swift_Attachment */
$attachment = $this->getManager()->getDI()->get('\\Swift_Attachment')->setFile($byteStream);
return $attachment;
}