CMS MADE SIMPLE FORGE

Form Builder

 

[#7366] Files uploaded through File Upload are not attached to emails

avatar
Created By: Teun Koeman (tojnk)
Date Submitted: Mon Dec 19 04:31:06 -0500 2011

Assigned To:
Version: 0.7.1
CMSMS Version: None
Severity: Minor
Resolution: Works For Me
State: Closed
Summary:
Files uploaded through File Upload are not attached to emails
Detailed Description:
Recently upgraded from cmsms 1.9.4.2 -> 1.10.2

Files uploaded through a File Upload field are no longer attached to emails sent
using the:
- *Email to User-Supplied Email Address
- *Email Results to set Address(es)
fields.

This worked properly in 1.9.4.2

Files are successfully uploaded to the uploads directory.
Sendmail is successfully set up.

Tests are done on a fresh cmsms 1.10.2 install using xampp.


History

Comments
avatar
Date: 2012-01-21 05:45
Posted By: Tapio Löytty (Stikki)

Did you check that small checkbox at advanced tab of FileUpload field?

-Stikki-
      
avatar
Date: 2012-08-29 10:01
Posted By: Jonathan Ford (actualstudio)

Was this ever solved?

I'm having exactly the same problem with uploaded files not being attached to
emails, although they are successfully being added to the uploads folder.

The 'Deny file to be attached with emails' checkbox is not checked, so this
should work. Is there something else that could be interfering?

Jon
      
avatar
Date: 2012-09-03 10:49
Posted By: Teun Koeman (tojnk)

I found a workaround, by editing the file
modules\FormBuilder\classes\DispositionEmailBase.class.php.
in line 215 I replaced:

$filepath = getcwd();

With:

$filepath = rtrim($theFields[$i]->GetOption('file_destination'), '/').'/';

This problem look a lot like bug $7699:
http://dev.cmsmadesimple.org/bug/view/7699
      
avatar
Date: 2012-09-11 11:53
Posted By: Jonathan Ford (actualstudio)

Great, it works thanks!
      
avatar
Date: 2013-09-08 23:58
Posted By: Andre Reitz (andrereitz)

I`m also having problems with this, but with renamed files. If I try to attach
to the mail I get the following error:

Warning: finfo_file(/root/site/path/ORIGINALFILENAME.docx)
[function.finfo-file]: failed to open stream: Arquivo ou diret�rio n�o
encontrado in
/root/site/path//modules/FormBuilder/classes/DispositionEmailBase.class.php on
line 222

Deprecated: Function split() is deprecated in
/root/site/path/modules/FormBuilder/classes/DispositionEmailBase.class.php on
line 234

I renamed the link to be easier to understand.

I tried to just print a url with the file name to be accessed directly but I
can`t get the file extension, I tried using the $ext variable from the file
field but didn`t worked. Also tried to send with this field an assign smart tag
that stores $ext to a variable but I guess it`s not possible.

Any help would be appreciated 
      
avatar
Date: 2013-09-09 00:24
Posted By: Andre Reitz (andrereitz)

Actually file extension is not necessary, I used the same field names (i.e
{fld_46}) that renamed the file and it works fine.

It works for creating an <a> to access the file!
      
avatar
Date: 2015-01-25 05:52
Posted By: Rolf (rolf1)

Please try again in release 0.8.1.1

Thanks, Rolf
      
avatar
Date: 2015-08-04 15:12
Posted By: Jeff Bosch (ajprog)

Is it working for me now.
      
Updates

Updated: 2016-01-16 15:23
state: Open => Closed

Updated: 2015-08-04 15:12
resolution_id: 6 => 11

Updated: 2015-01-21 11:03
cmsms_version_id: 29321 => -1
assigned_to_id: 11306 => 100

Updated: 2012-01-21 05:45
resolution_id: => 6
assigned_to_id: 100 => 11306