Forums

Email attachments not working

rikulahteenmaki 06 Mar, 2021
I have the form in 'sequential' mode, and on the second page's actions are the functions 'Upload' and 'Email'.
However, no files are uploaded nor attached in the emails.
In the file field 'Attachment' behavior is included. There are also 'Email', 'DB log', 'Upload' and 'Validate'.
rikulahteenmaki 06 Mar, 2021
Answer
The solution was to add 'Data -> Upload files' behavior in FORM settings.
Now files are uploaded on the given folder AND files are attached to emails.
Separate 'Upload' function is not required in the Page Actions.
NickOg 14 Mar, 2021
Hi

Useful - still stuck though. Any idea why I might be receiving this message? I am pretty sure my form matches your description.
Regards
Nick

    [end_page_upload] => Array
        (
            [path] => /home/*******/develop.*******.org.au/components/com_chronoforms7/chronoforms/uploads/
            [filesUpload] => Array
                (
                    [info] => File is not present.
                )

            [var] => Array
                (
                )

        )
rikulahteenmaki 14 Mar, 2021
Hi Nick,

I checked my form's debug data.

Comparing to your data, it means your file was not saved, because this line is missing:
[saved] => true
I have a multifield upload, and I tested the form with one upload file, leaving the rest of the fields empty.

The empty file fields resulted in this line:
[info] => File is not present.

R
NickOg 14 Mar, 2021
Thanks for the reply - I can't find that data field [saved] anywhere. How is that set? I presume somewhere in the Files control. The settings I have used are so


I changed the form to multiselect but it seems to make now difference.

Any suggestions gratefully received - especially today - being my birthday.🤣

Regards
Nick
rikulahteenmaki 14 Mar, 2021
The multiselect is not needed. I referred to 'Multifield' (Areas menu) into which I bundled four file upload fields.
Go to the form settings (next to the form name on the upper bar) and check that the Data behavior has 'Upload files'
Congratulations for having the same birthday with Albert Einstein.
NickOg 14 Mar, 2021
Sorry - missed that multi field point. Checked and looks OK to me.

Einstein - I didn't know that. He isn't helping me nut this out though is he?🤣
Would you be interested/have the time to look at a copy of the form if I sent you a PM copy? A birth day treat? 🙂
Nick
NickOg 14 Mar, 2021
Thanks - sent via PM
Nick
rikulahteenmaki 14 Mar, 2021
I removed the PHP code blocks in your Actions Editor and could get the the attach file uploaded and emailed.
On the page 2 actions check the order of the actions. There was the redirect before email action. This is wrong. The form has to be emailed before redirection.
NickOg 14 Mar, 2021
Hmm! I have removed everything from the form sent to you as you can see. Nothing there except the basic fields and actions and still no good.

Once I get through this I will explain why I left that redirect there.

ps - my excuse - Einstein 14th My birthday 15th - one day ahead down under in Aus🙂

Nick
rikulahteenmaki 15 Mar, 2021
You updated .bak form uploads and attaches the file to email. No errors listed in the debug code.
NickOg 15 Mar, 2021
all very odd and I will need to check that out further. It certainly doesn't work for me!

Regarding

there was the redirect before email action. This is wrong. The form has to be emailed before redirection


I included that as a work around for another problem related to validation required on a text area. The redirection include a condition to only run if the area was empty so I assumed was OK. I will log another post about that later on that matter.

Anyway - thanks for the help.
Nick
NickOg 15 Mar, 2021
Progress! I have not worked out why as yet but if I add some allowed extensions (png, jpg, pdf etc) the files are uploaded OK. That is OK since I wanted to restrict the file types.

I am now trying to work out why the files are not attached to the email though.
Nick
NickOg 16 Mar, 2021
Damn it! I am having some trouble with this. It has to be something so obvious I cant see it. My files are now being uploaded but are not being attached to the email. What am I missing now!!!!
Any suggestions???
Nick[file=13803]mailtest.pdf[/file]
adam M 31 Mar, 2021
Last days I also had problems with send email ...
I added - Advanced settings - From data ..

SMTP serwers require "from" in the email head.
This solved my problem
NickOg 07 Apr, 2021
Whatever the problem AOK today before I got to try adam Ms fic . I think an update came through.
Nick
You need to login to be able to post a reply.