I wrote such code for sending attachment, but I don’t receive attachment. I only receive empty email without attachment. I wonder where is the problem? Could you please have a look and give me response if file is attached correctly. I am not sure if file attachment is really fully implemented and tested in Spryker because I didn’t find any usages in Spryker’s core/default.
`public function sendBusinessLicenseFile(CompanyTransfer $companyTransfer): CompanyResponseTransfer
$mailTransfer = new MailTransfer();
$recipient = new MailRecipientTransfer(); $recipient->setName($this->businessFileRecipientName); $recipient->setEmail($this->businessFileRecipientEmail); $mailTransfer->addRecipient($recipient); $fileUrl = $this->businessFileFilepath . '/' . $companyTransfer->getBussinessLicenseFile(); $attachment = new MailAttachmentTransfer(); $attachment->setAttachmentUrl($fileUrl); $attachment->setFileName($fileUrl); $attachment->setDisplayName($companyTransfer->getBussinessLicenseFile()); $mailTransfer->addAttachment($attachment); $this->mailFacade->handleMail($mailTransfer); $response = new CompanyResponseTransfer(); $response->setIsSuccessful(true); return $response; }`