Forums

Can't attach file from form to email

lufer 30 Jan, 2015
Hello all,

I really need your help to understand why my form is not attaching the files to the email.

I have followed the basic guide, enabling the debugger, but I can't figure out why is not working.

I have already inserted the list of field names with no success.

I really appreciate any kind of help

LuFer
GreyHead 30 Jan, 2015
Hi lufer,

The red icon on the Upload Files action suggests that you don't have the File extensions configured?

Bob
Contix71 12 Feb, 2015
Hello,
I have the same problem and I have already read all the links of Calculus00, but no one has solved! 😟

I'm using CFv5 and basically, I have to attach a file (loaded in my form by users) to one of the emails that I send through "action email." Despite all attempts, no file is attached to the test email sent (while all other data are shown correctly)!

I hadn't this problem with CFv4 and the action "Email [GH]", but now I have it with CFv5, which in theory should be easier to start with only the name of the field without braces....
However, here are a few images and the result of debugging, which I hope will help to find a solution:

There are the general actions: as you see, the "File Upload" action looks correct. The red squares in "Email actions" are this way because of the dynamic actions I've set (but I already solved with the php code suggested in another topic):


This is the detail of my File Uoload configuration:


This is the Email action configuration in "Attachment files" with only the field name:


And finally, here is the result of debug of my last test:

Array
(
    [9] => Array
        (
            [DB Save] => Array
                (
                    [Queries] => Array
                        (
                            [0] => INSERT INTO `j25_cf_v5_INSERZIONI_CERCO-OFFRO_LAVORO` (`titolo_inserzione`, `tipologia`, `categorie_professionali`, `tipo_di_impiego`, `nome_azienda_studio`, `email_utente`, `inserzione`, `created`) values ('Inserzione di prova 21', 'CERCO LAVORO', 'Ingegneri', 'Impiego all'Estero', 'Gius20', '
 contix71@---------.it', 'Inserzione di prova 21 v waòevb rwevbujr bwdfks npriyjnsri knkrymnrkmnr tkn iktn reaitna tenaite aàkegnkkgdòbnk', '2015-02-12 00:00:41');
                        )

                )

        )

    [6] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:
 contix71@----------.com
                    [2] => Subject:Nuova inserzione inviata!
                    [3] => From name:Gius20
                    [4] => From email:
 contix71@-----------.it
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<h3><strong>E' stata compilata una nuova inserzione coi seguenti dati:</strong><br /><br /></h3>
<table>
<tbody>
<tr>
<td><em><strong>TITOLO INSERZIONE</strong></em></td>
<td>Inserzione di prova 21</td>
</tr>
<tr>
<td><em><strong>Tipologia</strong></em></td>
<td>CERCO LAVORO</td>
</tr>
<tr>
<td><em><strong>Categorie professional</strong>i</em></td>
<td>Ingegneri</td>
</tr>
<tr>
<td><em><strong>Tipo di impiego</strong></em></td>
<td>Impiego all'Estero</td>
</tr>
<tr>
<td><em><strong>Nome / Azienda / Studio</strong></em></td>
<td>Gius20</td>
</tr>
<tr>
<td><em><strong>Email</strong></em></td>
<td>
 contix71@---------it</td>
</tr>
<tr>
<td><em><strong>Inserzione</strong></em></td>
<td>Inserzione di prova 21 v waòevb rwevbujr bwdfks npriyjnsri knkrymnrkmnr tkn iktn reaitna tenaite aàkegnkkgdòbnk</td>
</tr>
</tbody>
</table>
<p> </p>
                )

        )

    [7] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:
 contix71@l----------t
                    [2] => Subject:Inserzione inviata con successo!
                    [3] => From name:Architettipescara.it
                    [4] => From email:
 commissione@------------------a.it
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<h3>L'inserzione è stata inviata con successo!</h3>
<h3>Entro pochi giorni riceverai un'email di conferma dell'avvenuta pubblicazione.</h3>
<p> </p>
<table>
<tbody>
<tr>
<td><em><strong>TITOLO INSERZIONE</strong></em></td>
<td>Inserzione di prova 21</td>
</tr>
<tr>
<td><em><strong>Tipologia</strong></em></td>
<td>CERCO LAVORO</td>
</tr>
<tr>
<td><em><strong>Categorie professional</strong>i</em></td>
<td>Ingegneri</td>
</tr>
<tr>
<td><em><strong>Tipo di impiego</strong></em></td>
<td>Impiego all'Estero</td>
</tr>
<tr>
<td><em><strong>Nome / Azienda / Studio</strong></em></td>
<td>Gius20</td>
</tr>
<tr>
<td><em><strong>Email</strong></em></td>
<td>
 contix71@l--------t</td>
</tr>
<tr>
<td><em><strong>Inserzione</strong></em></td>
<td>Inserzione di prova 21 v waòevb rwevbujr bwdfks npriyjnsri knkrymnrkmnr tkn iktn reaitna tenaite aàkegnkkgdòbnk</td>
</tr>
</tbody>
</table>
<p> </p>
<p style="text-align: center;"> </p>
<p style="text-align: center;"><em>Questo è un messaggio inviato automaticamente - si prega di non rispondere - no reply please</em></p>
                )

        )

)


I hope that this is enough for a solution. Thanks in advance.
GreyHead 12 Feb, 2015
Hi

The Files part of the Debug output has been cropped off but please try using Inserzione.inscerisi_curriculum in the Attachments box.

Bob
Contix71 12 Feb, 2015

Hi
The Files part of the Debug output has been cropped off but please try using Inserzione.inscerisi_curriculum in the Attachments box.



It doesn't works!😟 I'm doing several attempts, but without success. I also changed the field's name from Inserzione[inserisci_curriculum] to Inserzione[curriculum], also changing the various PHP codes connected to that name ..... nothing has happened: not only is the file not attached to email, but not even loaded on the folder with the default path!
Now I'll try to change the name deleting the square brackets from the field, which had just used to connect CF to CC, but without success.

If you have an other idea or suggestion, is well appreciated!🙂

Anyway, here's the latest test debug:

Data Array
Array
(
    [option] => com_content
    [view] => article
    [id] => 1809:bacheca-annunci-lavoro
    [catid] => 112:servizi
    [chronoform] => CERCO-OFFRO_LAVORO
    [event] => submit
    [Itemid] => 
    [Inserzione] => Array
        (
            [titolo_inserzione] => Prova!
            [tipologia] => CERCO LAVORO
            [categorie_professionali] => Conservatori
            [tipo_di_impiego] => Impiego all'Estero
            [nome_azienda_studio] => prova
            [email_utente] => 
 contix71@--------.it
            [inserzione] => ebwhqo4bethwoipwoi4b 4itb tjb tejw4 ètbjèretbjèr tbèrt bnrwt nrwthn rwthnorw noiwrq nwqoih niwq hnwqihpoihi
            [id] => 41
        )

    [accettazione_regole] => 1
    [invia] => INVIA
    [CERCO-OFFRO_LAVORO] => 
    [Inserzione[titolo_inserzione]] => Prova!
    [Inserzione[tipologia]] => CERCO LAVORO
    [Inserzione[categorie_professionali]] => Conservatori
    [Inserzione[tipo_di_impiego]] => Impiego all'Estero
    [Inserzione[nome_azienda_studio]] => prova
    [Inserzione[email_utente]] => 
 contix71@--------.it
    [Inserzione[inserzione]] => ebwhqo4bethwoipwoi4b 4itb tjb tejw4 ètbjèretbjèr tbèrt bnrwt nrwthn rwthnorw noiwrq nwqoih niwq hnwqihpoihi
    [Inserzione[curriculum]] => 
    [ip_address] => 5.90.103.162
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
    [9] => Array
        (
            [DB Save] => Array
                (
                    [Queries] => Array
                        (
                            [0] => INSERT INTO `j25_cf_v5_INSERZIONI_CERCO-OFFRO_LAVORO` (`titolo_inserzione`, `tipologia`, `categorie_professionali`, `tipo_di_impiego`, `nome_azienda_studio`, `email_utente`, `inserzione`, `created`) values ('Prova!', 'CERCO LAVORO', 'Conservatori', 'Impiego all'Estero', 'prova', '
 contix71@-------it', 'ebwhqo4bethwoipwoi4b 4itb tjb tejw4 ètbjèretbjèr tbèrt bnrwt nrwthn rwthnorw noiwrq nwqoih niwq hnwqihpoihi', '2015-02-12 17:37:02');
                        )

                )

        )

    [6] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:
 contix71@---------.com
                    [2] => Subject:Nuova inserzione inviata!
                    [3] => From name:prova
                    [4] => From email:
 contix71@----------.it
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<h3><strong>E' stata compilata una nuova inserzione coi seguenti dati:</strong><br /><br /></h3>
<table>
<tbody>
<tr>
<td><em><strong>TITOLO INSERZIONE</strong></em></td>
<td>Prova!</td>
</tr>
<tr>
<td><em><strong>Tipologia</strong></em></td>
<td>CERCO LAVORO</td>
</tr>
<tr>
<td><em><strong>Categorie professional</strong>i</em></td>
<td>Conservatori</td>
</tr>
<tr>
<td><em><strong>Tipo di impiego</strong></em></td>
<td>Impiego all'Estero</td>
</tr>
<tr>
<td><em><strong>Nome / Azienda / Studio</strong></em></td>
<td>prova</td>
</tr>
<tr>
<td><em><strong>Email</strong></em></td>
<td>
 contix71@-------.it</td>
</tr>
<tr>
<td><em><strong>Inserzione</strong></em></td>
<td>ebwhqo4bethwoipwoi4b 4itb tjb tejw4 ètbjèretbjèr tbèrt bnrwt nrwthn rwthnorw noiwrq nwqoih niwq hnwqihpoihi</td>
</tr>
<tr>
<td><em><strong>Curriculum</strong></em></td>
<td></td>
</tr>
</tbody>
</table>
<p> </p>
                )

        )

    [7] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:
 contix71@---------.it
                    [2] => Subject:Inserzione inviata con successo!
                    [3] => From name:Architettipescara.it
                    [4] => From email:
 commissioneservizi@----------------.it
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<h3>L'inserzione è stata inviata con successo!</h3>
<h3>Entro pochi giorni riceverai un'email di conferma dell'avvenuta pubblicazione.</h3>
<p> </p>
<table>
<tbody>
<tr>
<td><em><strong>TITOLO INSERZIONE</strong></em></td>
<td>Prova!</td>
</tr>
<tr>
<td><em><strong>Tipologia</strong></em></td>
<td>CERCO LAVORO</td>
</tr>
<tr>
<td><em><strong>Categorie professional</strong>i</em></td>
<td>Conservatori</td>
</tr>
<tr>
<td><em><strong>Tipo di impiego</strong></em></td>
<td>Impiego all'Estero</td>
</tr>
<tr>
<td><em><strong>Nome / Azienda / Studio</strong></em></td>
<td>prova</td>
</tr>
<tr>
<td><em><strong>Email</strong></em></td>
<td>
 contix71@---------.it</td>
</tr>
<tr>
<td><em><strong>Inserzione</strong></em></td>
<td>ebwhqo4bethwoipwoi4b 4itb tjb tejw4 ètbjèretbjèr tbèrt bnrwt nrwthn rwthnorw noiwrq nwqoih niwq hnwqihpoihi</td>
</tr>
</tbody>
</table>
<p> </p>
<p style="text-align: center;"> </p>
<p style="text-align: center;"><em>Questo è un messaggio inviato automaticamente - si prega di non rispondere - no reply please</em></p>
                )

        )

)
Contix71 12 Feb, 2015
Hey Bob,

I solved it by removing all the square brackets from the names of the fields! 😀
With a single field name for "File Upload" action and without brackets, the file is uploaded on the server and attached to the email to be sent.

However, since I had put those brackets to create a model ID by following this tutorial:

http://www.chronoengine.com/faqs/72-ccv5/5208-connectivity-edit-with-chronoforms.html

I suggest you to show clearly this problem in that tutorial or to correct the error.

Thanks anyway, Bob!🙂
GreyHead 13 Feb, 2015
Hi Contix71,

The problem may be with the names like [Inserzione[titolo_inserzione]] which I think should be Inserzione[titolo_inserzione] ?

I'm not clear where the the extra [] have come from.

Bob
Contix71 13 Feb, 2015
No, my original name was without double brackets:

Inserzione[titolo_inserzione]

So, even myself don't know where the the extra [] have come from
This topic is locked and no more replies can be posted.