Email attachments unable to locate files - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Email attachments unable to locate files (/showthread.php?tid=37151) |
Email attachments unable to locate files - El Forum - 12-29-2010 [eluser]Ngulo[/eluser] Hi guys, i'm trying sending attachments files in email : all is working but and email arrives but attachments shows this error: Code: Unable to locate the following email attachment: http://www.asd.com/files/file.pdf if i go to file url (http://www.asd.com/files/file.pdf ) by browser i can see that file!! anyone can help me? my email script is simple: Code: if($_FILES['bill_file']['tmp_name'] and $_FILES['bill_file']['name']) so just to explain my script, first of all i upload and move file into main folder, then i create email , take created file and attach that to email and in the end i send email... my folders are all 775 really don't know why anytime the file is created but not attached thanks to anyone can help me guys Email attachments unable to locate files - El Forum - 12-30-2010 [eluser]Atharva[/eluser] That's coz you are using absolute path. You need to use relative path. See following statement from the guide Quote:Note: Use a file path, not a URL. Code: $this->email->attach('/path/to/photo1.jpg'); Email attachments unable to locate files - El Forum - 01-01-2011 [eluser]Ngulo[/eluser] thanks man!!! solved really thanks |