Hi
I've been looking all over this forum for a MOD that would send a notification (or confirmation) to new subscribers of the mailinglist, but there were no MODs around. Therefor I decided to make my own, but as you can see it is one of the simplest MODs ever to be released.. but remember that this is also my first.
Well.. let's get down to the coding. (Please remember to make a backup of the files you modify)
Open subscribe.cgi and look for the text:
&site_html_mailing ('subscribe');
}
Insert this code above it:
my $from = $db_admin_email;
my $subject = "Subscribed to the $build_site_title mailinglist";
my $msg = qq|Dear $in{'name'},
thank you for subscribing to our mailinglist, and for visiting
$build_site_title. This is a lowlevel list which will only be
used to send out news concerning the site $build_site_title, but
who knows what it'll turn out to be.
If you have any ideas, any comments or anything, please don't
hessitate to email the webmaster at: $db_admin_email;
Sincerely,
$build_site_master, $db_admin_email;
$build_site_title
-------
You can unsubscribe from this mailinglist at any time by using this address:
$build_email_url?action=unsubscribe&email=$in{'email'}
|;
# Then mail it away!
require "$db_lib_path/Mailer.pm";
my $mailer = new Mailer ( { smtp => $db_smtp_server,
sendmail => $db_mail_path,
from => $from,
subject => $subject,
to => $to,
msg => $msg,
log => $db_mailer_log
} ) or return;
$mailer->send or return;
Next.. Open the links.cfg and look for the following constant:
add this constant next to it:
Pretty simple, eh? Enjoy
------------------
Ronny Salomonsen <rsalomon@online.no>
Feline Medias
[This message has been edited by rsalomon (edited March 31, 2000).]
I've been looking all over this forum for a MOD that would send a notification (or confirmation) to new subscribers of the mailinglist, but there were no MODs around. Therefor I decided to make my own, but as you can see it is one of the simplest MODs ever to be released.. but remember that this is also my first.
Well.. let's get down to the coding. (Please remember to make a backup of the files you modify)
Open subscribe.cgi and look for the text:
Code:
# Go to the success page. &site_html_mailing ('subscribe');
}
Insert this code above it:
Code:
my $to = $in{'email'}; my $from = $db_admin_email;
my $subject = "Subscribed to the $build_site_title mailinglist";
my $msg = qq|Dear $in{'name'},
thank you for subscribing to our mailinglist, and for visiting
$build_site_title. This is a lowlevel list which will only be
used to send out news concerning the site $build_site_title, but
who knows what it'll turn out to be.
If you have any ideas, any comments or anything, please don't
hessitate to email the webmaster at: $db_admin_email;
Sincerely,
$build_site_master, $db_admin_email;
$build_site_title
-------
You can unsubscribe from this mailinglist at any time by using this address:
$build_email_url?action=unsubscribe&email=$in{'email'}
|;
# Then mail it away!
require "$db_lib_path/Mailer.pm";
my $mailer = new Mailer ( { smtp => $db_smtp_server,
sendmail => $db_mail_path,
from => $from,
subject => $subject,
to => $to,
msg => $msg,
log => $db_mailer_log
} ) or return;
$mailer->send or return;
Next.. Open the links.cfg and look for the following constant:
Code:
$build_site_title = 'Your site';add this constant next to it:
Code:
$build_site_master = 'Im a lamer with no name';Pretty simple, eh? Enjoy
------------------
Ronny Salomonsen <rsalomon@online.no>
Feline Medias
[This message has been edited by rsalomon (edited March 31, 2000).]