Forum Moderators: phranque

Message Too Old, No Replies

How to send email automaticly.

         

Jeffry

3:58 pm on Jan 17, 2003 (gmt 0)

10+ Year Member



I would have an email sent to me after someone downloads a certain software from my site.
Can this be done whitout interacting of the sites visitor?

Jeffry

Brett_Tabke

4:01 pm on Jan 17, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi Jeffry - I believe you'd have to have some sort of file server software to accomplish it.

Another way, (if you have the tech skills), would be to run a cron job to parse your own site log file and email you if it see's a new download since the last cron run.

I don't believe there is anything default in Apache or iis that would allow the sending of an email on the request of a single file.

Jeffry

4:14 pm on Jan 17, 2003 (gmt 0)

10+ Year Member



Yes, I can see the number of downloads in my log files. But that's not what I try to achive.
I want to receive an email from the visitors who have downloaded the file. I want to have their email address.
I know it can be done, just don't know how.

dingman

4:16 pm on Jan 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yet another approach would be to write a server side script (PHP, Perl, etc) to send the file as output and send you an e-mail at the same time. Then instead of linking the file people are after, you could link the script. Just make sure you remember to set the correct content-type headers before you start sending the data to the browser, or the results won't be what you expect.

dingman

4:18 pm on Jan 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Whoa, cowboy. You want their e-mail address without them taking any action to give it to you? I'd be extremly upset if you did that to me. (And if you did get that info out of my browser, it would be bogus.)

Jeffry

4:34 pm on Jan 17, 2003 (gmt 0)

10+ Year Member



Sorry to upset you Dingman.
I'm not intend to use the emails for bad purposes or spamming.
I just want to have some control over an affiliate that I have.

dingman

4:52 pm on Jan 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think there's a reliable way to do this. E-mail address is not one of the standard headers in HTTP, and while it's quite normal to ask for e-mail address as an anonymous FTP password, there's really no way to verify it. I just checked, and the browser I'm using seems not to have any straigtforward way to set the e-mail address to use. It's not even making an educated guess - it sends 'mozilla@example.com'.

Maybe you should go the route of using the script I described, but adding in a step where the user types in an e-mail address. Make sure you put up a disclaimer telling people that the e-mail address will not be used for any purpose other than to send a single confirmation e-mail, perhaps. Or do something even fancier, and generate a unique ID that gets e-mailed to them, which they can then use to access the file through another script?

Those solutions might turn off a few customers and/or be overkill for your purposes, but they are all that occurrs to me.