PDA

View Full Version : Sending email after download


John Langer
03-26-2009, 06:30 AM
Hi,

I've set up a file upload and download using DFP. Works like a charm.

I now want to set it up to send an email that will say that so and so has downloaded such a file. I have no problem in organising that, I've done it before.

It's the trigger to send the email that I'm having difficulty with.

I have a page that contains a link together with a parameter for the file. This passes to the download page where I have the DFP behaviour. On this page I've set up UE. I've set the trigger to send the email on a successful download.

Trouble is it doesn't send the email.

Is there a tutorial on how to do this specifically anywhere?

Many thanks.

Ray Borduin
03-26-2009, 07:41 AM
Are you redirecting after the insert or upload before the email is sent? Make sure you aren't and the page redirect is only specified in the UE server behavior. This is usually the problem when emails aren't sending as you describe although I can't really be sure.

John Langer
03-26-2009, 08:44 AM
Hi Ray,

Thanks for the reply.

The DFP behaviour is to download a file.

I've found that if I move the UE behaviour above the DFP behaviour and change the trigger to "Send if recordset is not empty" then it sends OK. So some success there.

In the trigger events list however there are two that say "download 1 successful" and "download 1 failed" I really only want to send the email if the download is successful. I know the recordset won't be empty. So in other words the email is currently sent whether the file is actually successfully downloaded or not. Defeats the object really.
I've tried using the trigger of download successful but again it's not sent.

Neither behaviours have a redirection in them.

However if there is no other solution I'll live with what I've got.

Many thanks for pointing me in the right direction.

Ray Borduin
03-26-2009, 01:00 PM
Download basically turns the page into the file, so you can't really process after because the file isn't really downloaded until the page is done and the file is sent to the user and the code stops running.

John Langer
03-26-2009, 03:05 PM
OK Ray, I'll just have to make do. It works OK and the client seems happy.

Thanks for trying to think of a way.