send email after downloading a file?

piripacchio
Posts: 37
Joined: 2010-04-28 08:34

send email after downloading a file?

Post by piripacchio » 2010-05-11 15:37

Hi all,
I built a little file management system using MX Kollection 3 pro.
A logged user can upload or download a file.
I can easily add the send email behaviour when uploading a file.
But, is there a way to send an email after downloading a file?

TIA
tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: send email after downloading a file?

Post by Fred » 2010-05-12 13:10

Haven't done it before but I would imagine you would need a custom transaction similar to this one listed here http://www.interaktonline.info/article/ ... -site.html

It would obviously need some hand coding and I would assume you would ad a third line after the following code:

// Download File downloadObj1
$downloadObj1 = new tNG_Download("", "KT_download1");
$downloadObj1->setConnection($conn_SiteConn, "SiteConn");
$downloadObj1->sendEmail(something) // Call your custom function

piripacchio
Posts: 37
Joined: 2010-04-28 08:34

Re: send email after downloading a file?

Post by piripacchio » 2010-05-17 11:12

Fred wrote:Haven't done it before but I would imagine you would need a custom transaction similar to this one listed here http://www.interaktonline.info/article/ ... -site.html
Thanks Fred,
but I cannot add a custom trigger to the nextensio list. I get an error saying there is no insert/update/delete transaction on page.

Is there a workaround to add it anyway?

tia

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: send email after downloading a file?

Post by Fred » 2010-05-17 11:45

You are right, it is dependant on a transaction.

Think I have a very crude way that could work.
Change the download link to a checkbox confirming something like "I agree with download Terms" or something.
When clicked open a new page with the download link and use the "Send Page by Email" behaviour?

Post Reply