Read DB, export to xls and send it by email automatically is it possible

teldrive 10 Apr, 2014
I am trying to do an automatic exportation of records based on a condition of my table
first I make DB multi-read with a condition and with model "bol"
after I am pursuing to export to Excel file, I am not sure if just with model bol export all the multiread data is transfered
there is an option of post Excel filename but always appears en web option to download the file(i vae in not "to save", so process is not done
[attachment=0]Captura22.JPG[/attachment]
[attachment=1]Captura23.JPG[/attachment]
I wolud like to send this file by email automatically
is it posible?
Max_admin 20 Apr, 2014
Hi Teldrive,

A bit late answer, sorry!

First, please try to make sure the export is done correctly, after that use the "post file name" setting, you will need to add a string with no spaces or dots..etc here, its a string matching a field name, which you will then use in the Email's "Attachments fields names".

Let me know how this works!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive 21 Apr, 2014
Hi Max
It didn't work, " xls export" action seems need to be the last one, because email is never sent and always "save file" is requested
[attachment=0]Captura.JPG[/attachment]
When i deleted "xls export" action I received email(but without file)
[attachment=1]Captura1.JPG[/attachment]
GreyHead 22 Apr, 2014
HI teldrive,

You must set Save File to Yes if you want to save the file to the server and attach it to an email. If you leave that at No then it ends the ChronoForms processing and goes directly to the file download instead.

Bob
teldrive 22 Apr, 2014
Thanks Bob, I tried, I've got some advance but not the goal
[attachment=0]Captura.JPG[/attachment]
I set to yes save file( it's adviced in setup form sorry😶 )
but I couldn't see saved file on default path and email is sent but without attachment
[attachment=1]Captura1.JPG[/attachment]
GreyHead 22 Apr, 2014
Hi Teldrive,

I don't know CFv5 very well yet :-( If you turn the debugger on does that show you that a file has been saved and where?

Bob
Max_admin 22 Apr, 2014
The file is not inside the "gestion_boletin_exportar_form" folder ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
teldrive 22 Apr, 2014
Answer
Hi Bob It's working, your help has been very useful😀
the key issue is that is necessary also to declare a xls file, it seems "Post file name" is a variable name to pass the real value that is xls file name. Attachment is stored in default folder and sent by email without problems.
Attachments:/var/www/vhosts/seden.es/httpdocs/components/com_chronoforms5/chronoforms/exports/gestion_boletin_exportar_form/prueba.xls

[attachment=0]Captura.JPG[/attachment]
GreyHead 23 Apr, 2014
Hi teldrive,

The 'Post File Name' is a slightly misleading name :-( As I understand it, it allows you to set a variable with that name in the $form->data array where the data about the file will be saved.

Bob
This topic is locked and no more replies can be posted.