I would link to send .odt file generated by TinyButStrong using Swiftmailer. This is mu current code
->setSubject('Customer General Email from '. $date->format("m-d-Y H:i"))
//->setTo($address)
->setFrom('avangardauto33@gmail.com')
->attach(
\Swift_Attachment::newInstance()
->setFilename('space_calculator_results.odt')
->setContentType('application/odt')
//->setBody($TBS->Show(OPENTBS_DOWNLOAD, 'space_calc_results.odt'))
->setBody($TBS->Show())
)
->setBody($this->renderView(
'WinslowUserBundle:User:calc_results_email.html.twig',
array('data' => $data)), 'text/html');
$this->get('mailer')->send($message);
I've got the file attached, but I can't open the file with LibreOffice.
So is there any way to get correct file handler to be able to attache it to my email later? Any help is appreciated. Thanks