Forums

File uploads but no attachment

ms_buggy 19 Nov, 2013
Hi,

I was able to get file uploaded from the form to the server. But unable to solve how to attach it to the email, how should I do it?

The debugger reports the file name (the saved file unique name), also name of the file is in received email, but no attachment? (the form method is file).

Couple checkpoints:
1. Is this correct (in the File Attachments -field) input1, input2, file (the file is the input type file). I have tried both email and emailgh, and tried with {} and {#path#}.
2. Should the email -action be inside upload - OnSucces? I cannot save any action into this..


Is there any faq about this, like step by step?

Kind regards,
Buggy
GreyHead 19 Nov, 2013
Hi Buggy,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

Note: if you are using the Easy Wizard you can turn on Debug on the Others tab.

Bob
ms_buggy 20 Nov, 2013
Here is the debug:
Data Array: 
Array
(
    [chronoform] => Rekrytointilomake
    [event] => submit
    [Itemid] => 114
    [option] => com_content
    [view] => article
    [id] => 12
    [enimi] => test
    [snimi] => test
    [svuosi] => 
    [pnumero] => 
    [ppaikka] => 
    [puhelin] => 0000
    [email] => 
    [tkokemus] => 
    [koulutus] => 
    [osaaminen] => 
    [matkustusvalmius] => 
    [haettava] => 
    [tyontyyppi] => 
    [laheta] => 
    [0ae618b842ced1bfe6e112f47b6e0a37] => 1
    [cv] => 20131120090301_testitxt.txt
    [_PLUGINS_] => Array
        (
            [upload_files] => Array
                (
                    [cv] => Array
                        (
                            [name] => 20131120090301_testitxt.txt
                            [path] => /server/cv/20131120090301_testitxt.txt
                            [size] => 7
                            [link] => http://www.domain.com/cv/20131120090301_testitxt.txt
                        )

                )

        )

    [IPADDRESS] => xxx.xxx.xxx.xxx
)
Validation Errors: 
Array
(
)
Kiitos! Debug Data
Upload routine started for file upload by : cv
/server/cv/20131120090301_testitxt.txt has been uploaded OK.
Email info
Email sent successfully
From: (admin) xya@gmail.com
Reply to: (admin) xya@gmail.com
To: xya@gmail.com
Subject: rekry
Email body
Henkilötiedot
Etunimi:*	 test
Sukunimi:*	 test
Syntymävuosi:	
Postinumero:	
Postitoimipaikka:	
Puhelinnumero:*	 0000
Sähköposti:	
Työkokemus
(työnantaja, työtehtävä, työssäoloaika)

Koulutus
(tutkinnon nimi, koulun nimi, valmistumisvuosi)

Muu osaaminen
Matkustusvalmius:	
CV (max. 1MB):	 20131120090301_testitxt.txt
Haettava työ:	
Työn tyyppi:	
Submitted by xxx.xxx.xxx.xxx
email
8
Result
An email has been SENT successfully from (rekry testing)xya@gmail.com to xya@gmail.com
Body
Henkilötiedot
Etunimi:*	 test
Sukunimi:*	 test
Syntymävuosi:	
Postinumero:	
Postitoimipaikka:	
Puhelinnumero:*	 0000
Sähköposti:	
Työkokemus
(työnantaja, työtehtävä, työssäoloaika)

Koulutus
(tutkinnon nimi, koulun nimi, valmistumisvuosi)

Muu osaaminen
Matkustusvalmius:	
CV (max. 1MB):	 20131120090301_testitxt.txt
Haettava työ:	
Työn tyyppi:	

Submitted by xxx.xxx.xxx.xxx
Attachments
array ( )


Here is the mail:
Henkilötiedot
Etunimi:* 	test
Sukunimi:* 	test
Syntymävuosi: 	
Postinumero: 	
Postitoimipaikka: 	
Puhelinnumero:* 	0000
Sähköposti: 	
Työkokemus

(työnantaja, työtehtävä, työssäoloaika)
	
Koulutus

(tutkinnon nimi, koulun nimi, valmistumisvuosi)
	
Muu osaaminen
	
Matkustusvalmius: 	
CV (max. 1MB): 	20131120090301_testitxt.txt
Haettava työ: 	
Työn tyyppi: 	

Submitted by xxx.xxx.xxx.xxx
ms_buggy 21 Nov, 2013
Any suggestions with this?

Could you please confirm / check that I have the right configuration:
1. what value should be written in "File Attachments" field in the email action? ("a comma separated list of files to be attached; for uploaded files use {input_name} or for existing files use the file path.You can use the {#path#} placeholder in a path - it will be replaced by "). I have tried field name and path.

2. Should the email action be inside upload actions 'On success' -event?
Currently I'm unable to save any action inside it..

3. Are the 'Form method - File' and value in the file attachments field enough to get get attachment to email?

According to this video the upload is the only action that should matter: http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=26&t=25095
In my debug the 'Array' is empty, but still the upload action is working..!?

-Buggy
GreyHead 21 Nov, 2013
Hi Buggy,

You need cv in the Attachments box (the name of the file upload input without quotes or brackets). Everything else looks OK.

Bob
ms_buggy 21 Nov, 2013
Thank you!

I tried 'cv' in the field but I cannot get it to work.
In your video tutorial I can see in the debug that there is value in the array.
Mine is empty (array ( )), could this have something to do with the prob?

I'll try reinstalling later, now too busy to do all the forms again..
GreyHead 21 Nov, 2013
Hi Buggy,

Is the Upload Files action *before* the Email action in the event?

Bob
ms_buggy 22 Nov, 2013
Hello GreyHead!

No, it is not :/


And, here are the file attachment values:

enimi, snimi, svuosi, pnumero, ppaikka, puhelin, email, tkokemus, koulutus, osaaminen, matkustusvalmius, cv, haettava, tyontyyppi



And here is the cv(the file upload input) in the template:

<tr>
<td>
CV (max. 1MB):
</td>
<td>
{cv}
</td>
</tr>

ms_buggy 25 Nov, 2013
Okay, just finished massive testing.
Problem is around here:

Attachments
array ( )


Reinstalled CF 3 times, and didint get any attacments. Installed site for testing to another server, and got the attacment easily. So the problem is somewhere with the server. Just dont get where..
GreyHead 26 Nov, 2013
Hi Buggy,

Are the files uploading to the server OK? If you add a Debugger action you should be able to see.

Bob
ms_buggy 26 Nov, 2013
Yes, the upload works just fine, but no attachment on email.

Okay I just figured out the problem.
When I use just fileupload field name in the 'Attachments fields name' in Email event, the mail has the file attached. like this: 'cv'

If I add any text input field to the 'Attachments fields name', I get no attachment, but the template is fine (other field(s) / text input).
Like this: 'field1, cv'.

Is this a bug? Or how I should create the email configuration so that I would get a email with the text values and with the attachment.

Kind regards, B
GreyHead 27 Nov, 2013
Hi Buggy,

Why on earth would you want to add the name of a text input to the Attachments box? (And if you do add more than one file input name, please use just a comma to separate with no space.)

Bob
ms_buggy 28 Nov, 2013
Thank you Bob, your the best!
I dont how but somehow I have understood that all the fields should be written to that field, for the email template. So sorry about the trouble!

-Buggy-
GreyHead 28 Nov, 2013
Hi Buggy,

There are a few eccentric things in ChronoForms but most of the time the simplest solution is the right one.

Bob
wegwb 06 Apr, 2014
Hi there,
ive the same problem.
Here the debug-info.
Data Array

Array
(
[option] => com_chronoforms5
[chronoform] => Initiativ_1
[event] => submit
[Itemid] =>
[Vorname] => Ronald
[Nachname] => Wegert
[Rufnummer] => 03491-889023
[Email] => wegwb@live.de
[filiale] => Dresden
[Nachricht] => v bcvbbcvb
[captcha] =>
[button8] => Absenden
[ip_address] => 94.139.27.119
)

Array
(
)

Errors

Array
(
)

Debug Info

Array
(
[4] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully:
[1] => To:info@wegwb.de
[2] => Subject:Eine Initiativbewerbung von spszeitarbeit.de
[3] => From name:keineAntwort@spszeitarbeit.de
[4] => From email:info@spszeitarbeit.de
[5] => Reply name:
[6] => Reply email:
[7] => Attachments:
[8] => Body:
<h3>Eine Initiativbewerbung ist von spszeitarbeit.de eingegangen</h3>
<p>Anbei die Daten:</p>
<table>
<tbody>
<tr>
<td>Vorname</td>
<td>Ronald</td>
</tr>
<tr>
<td>Nachname</td>
<td>Wegert</td>
</tr>
<tr>
<td>Rufnummer</td>
<td>03491-889023</td>
</tr>
<tr>
<td>Emailadresse</td>
<td>wegwb@live.de</td>
</tr>
<tr>
<td>Filiale</td>
<td>Dresden</td>
</tr>
<tr>
<td>Nachricht</td>
<td>v bcvbbcvb</td>
</tr>
</tbody>
</table>
<p> </p>
<p>Zu technischen Fragen steht Ihnen Herr Wegert unter 03491-889023 zur Verfügung.</p>

Poster's IP address:94.139.27.119
)

)

)
wegwb 06 Apr, 2014

Hi there,
ive the same problem.
Also Nothing is saved to the directory
upload_file Fildname is file_1 and the same i write in the attachment field of the e-mail event

Max_admin 24 Apr, 2014
Hi wegwb,

A bit late answer, but it looks like you don't have an "upload files" action enabled and configured!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.