Hi! I read from webmagic's website about this code that allows one to subscribe users form the database to listservers like majordomo. I was wondering if anyone can help me with a slight modification to the code. Presently, the code only allows a single user to be subscribe at one time. I woudl like to have a code that allows the system to find all the records with a particular field filled up by the admin and then subscribing all those records to the listsever.
For example,
There are 10 records with the field called class with a value of Class 1. the code will then take all these emial addresses and subscribe them automatically to the listsever.
The code below is the one I found on webmagic website.
if $rec{'receiveEmail'} eq 'yes'){
open (MAIL, "$mailprog") or &cgierr("Can't open sendmail!\n");
print MAIL "To: majordomo@majordomo.flash.net\n";
print MAIL "From: $rec{'email'}\n";
print MAIL "Subject: subscribe\n\n";
print MAIL "subscribe database-news-you-can-use\n";
close (MAIL);
}
So can anyone help me?
Julian
For example,
There are 10 records with the field called class with a value of Class 1. the code will then take all these emial addresses and subscribe them automatically to the listsever.
The code below is the one I found on webmagic website.
if $rec{'receiveEmail'} eq 'yes'){
open (MAIL, "$mailprog") or &cgierr("Can't open sendmail!\n");
print MAIL "To: majordomo@majordomo.flash.net\n";
print MAIL "From: $rec{'email'}\n";
print MAIL "Subject: subscribe\n\n";
print MAIL "subscribe database-news-you-can-use\n";
close (MAIL);
}
So can anyone help me?
Julian