file upload correctly, but unable to attach that file to an email, using CI's email library |
[eluser]Brad K Morse[/eluser]
Using form, file, and email libraries: controller Code: <?php first line of debugger prints: Your message has been successfully sent using the following protocol: mail I receive the email, but it does not attach the file, screenshot of what it attaches: http://cl.ly/5AVF The file uploads properly to the uploads directory, but I am doing something wrong with capturing the filename of the file uploaded. If I hardcode the file-path & file-name into the $this->email->attach('uploads/image.png'); - I receive the file correctly in the email. Any help is appreciated.
[eluser]erikstraub[/eluser]
It should be something like this: [quote author="bkmorse" date="1299893744"] Code: <?php I would only use it this way if you were always going to be adding an attachment. Otherwise, there should be a different way of sending the email without an attachment if there is no upload.
[eluser]Brad K Morse[/eluser]
Resolved: had to grab from the upload array $this->upload->data(); Code: $file_uploaded = $this->upload->data(); |
Welcome Guest, Not a member yet? Register Sign In |