Wednesday, January 28, 2015

Email CSV Attachment receives empty in Outlook 2013

I have received No Data CSV attachment email in Outlook 2013 only but got a CSV with data on gmail and other mails.

I have used the following CakePHP code:

            $this->Email->reset();
            $fileatt
= ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS;
            $this
->Email->to =array('ram@xyz.com');
            $this
->Email->cc =array('ram@gmail.com');
            $this
->Email->subject = "CSV mail";
            $this
->Email->from = "info@gmail.com";
            $this
->Email->sendAs = 'html';
            $this
->Email->filePaths  = array($fileatt);
            $this
->Email->attachments =array("Sample.csv");
            $this
->Email->charset = "utf-8";
            $this
->Email->headerCharset = "utf-8";
            $message
= "Hi Thanks!";
            $this
->Email->send($message);

Help me to resolve this.
Thanks.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: