Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function sendInvoiceReport($subject, $body)
- {
- // Initalize the message
- $message = \Swift_Message::newInstance()
- ->setSubject($subject)
- ->setFrom(array('noreply@fliinc.net' => 'FLI, INC'))
- ->setTo("tnovicoff@scotwoodindustries.com", "GBeal@scotwoodindustries.com", "sguerra@fliinc.net", "ALamendola@scotwoodindustries.com", "kfeldt@tekniq.com");
- $message->setBody($body, 'text/html');
- // Send the message
- $this->getContainer()->get('mailer')->send($message);
- // Manually flush the mail spooler because symfony is retarded
- $transport = $this->getContainer()->get('mailer')->getTransport();
- if (!$transport instanceof \Swift_Transport_SpoolTransport) {
- return;
- }
- $spool = $transport->getSpool();
- if (!$spool instanceof \Swift_MemorySpool) {
- return;
- }
- $spool->flushQueue($this->getContainer()->get('swiftmailer.transport.real'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement