This is quite a complex feature to achieve.
This can be done a few different ways but all involve the server where you will be collecting the data to be configured for this.
If the data collection server is configured to also function as a mail server then this should be pretty straightforward using Unverified Perl. On linux/unix it could look like this (make sure this path matches for your sendmail program).
[%
Begin Unverified Perl
my $sendmail = "/usr/sbin/sendmail -t";
my $subject = "Subject: User saw question X\n";
my $content = "Respondent #" . RESPNUM() . " saw question X";
my $send_to = "To: myemailaddress\@something.com";
open(SENDMAIL, "|$sendmail") or return "Cannot open $sendmail: $!";
print SENDMAIL $subject;
print SENDMAIL $send_to;
print SENDMAIL "Content-type: text/plain\n\n";
print SENDMAIL $content;
close(SENDMAIL);
return "";
End Unverified
%]
I would put this code on a page that had quotas for example since they are never seen but the logic is run. The quota could just be garbage data, but nonetheless would work.
Sending from windows servers is more complex. Using Activestate perl, install the Mail::SendMail perl package. If this package is installed on your linux server then you can use this code as well. Your unverified perl code could look like this.
[%
Begin Unverified Perl
require "Mail/SendMail.pm";
my %mail = ( To => 'you@there.com',
From => 'me@here.com',
Message => "This is a very short message"
);
Mail::SendMail->sendmail(%mail);
return "";
End Unverified
%]
I just had to add "\" before the "@" because I got a script error. Apparently Perl was expecting an array. I also added "send_from" so - for the record - the final thing that worked looked like this:
edited Mar 1, 2012 by Mike Lodder