Generate CSV and Email as Attachment |
Hi, I am new to Codeigniter and am looking for a way to create a csv on the fly and email that csv file as an attachment.
Need a bit of a push in the right direction with what code to use if anyone could help. Thanking you all in advance.
Hi Stewart,
Before some days i was facing same problem, even I am new to code igniter , i have refereed some links and that are working fine for me . you can refer following links 1.http://stackoverflow.com/questions/10663277/how-to-send-an-email-with-content-from-a-view-in-codeigniter 2.http://webrocom.net/generate-excel-file-using-phpexcel-in-codeigniter/ 3.http://stackoverflow.com/questions/13108508/how-can-i-attach-the-file-in-codeigniter-which-i-have-created-through-coding
I have solved this now.
I had to convert multidimensional array in to a string and then use the $this->email->attach() I was then able to send the string and give the attachment a name and mime type. |
Welcome Guest, Not a member yet? Register Sign In |