public function embedFile($file, $cid = null) { $attachment = Swift_Image::fromPath($file); if ($cid) { $attachment->setId(strpos($cid, 'cid:') === 0 ? $cid : 'cid:' . $cid); } return $this->embed($attachment); }