Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

PHP: how to attach multiple files to email

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to attach two excel files (sealing_production.xls & sealing_assembly.xls)to my email using php,but I have no idea on how to do it.


When I click on my send mail button, I gets the mail. with all details. but attachment is not working.


I echo the file name, its prints the file name from controller

Here my php code for the send Email function

and this the function of sendfullmail in my model:

What I have tried:

I have check similar links on stack overflow about this. But i'm unable to find any solution for this.

Link's i have checked
1.Codeigniter send email with attach file
2.Code Igniter -> attach email
3.codeigniter send pdf file as email attachment
4.How To Send Email With An Attachment In Codeigniter?
5.How to attach two or multiple files and send mail in PHP
6.Multiple e-mail attachments

I also try to put

in my model

and also this in my sendEmail function

but the email that i receive is only blank email without content.

I have try to solve this problem for two days but nothings work...I'm totally lost now      
I knew that guy would be trouble! Thanks tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic