|
|
|
10-16-2001, 08:59 AM
|
Postid: 54907
|
|
Site Owner
Join Date: Mar 1999
Posts: 98
|
ez mlm subscribe script
I would like to tweak the web-based subscription process by modifying the /cgi-sys/ezmlm/SelfServ.pl script. Does anyone know how I can view the perl source code?
Thanks.
|
|
|
10-16-2001, 03:15 PM
|
Postid: 54940
|
|
Visitor
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
|
I'll check to see if we've ever made that available or not, but if I recall (it's been a while), it's simply a modified mail form. What it does is sends a message to "listname-subscribe@domain", setting the "From:" address to what the user entered. You could very easily do this in PHP or Perl/sendmail, either from scratch or by modifying any one of the thousands of FormMail-type scripts available.
In any case, I'll check to see if we've ever made that script publically available or not... it was built in around 1998 and modified in '99, and that was the last time I touched it 
|
|
|
10-16-2001, 04:56 PM
|
Postid: 54944
|
|
CTO FutureQuest, Inc.
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,674
|
The SelfServ.pl script is not publicly available, nor was it ever written/intended to be...
You should be able to look at the raw HTML Form code and reverse engineer to write your own script...
--
Terra
sysAdmin
FutureQuest
|
|
|
10-16-2001, 09:46 PM
|
Postid: 54954
|
|
Site Owner
Join Date: Mar 1999
Posts: 98
|
(re-inventing the wheel)
I tried Justin's suggestion, but the ez-mlm tries to subscribe webmaster@mydomain instead of the "From: " address.
Any suggestions?
|
|
|
10-16-2001, 09:49 PM
|
Postid: 54955
|
|
Site Owner
Join Date: Aug 1999
Location: Metro Los Angeles Area
Posts: 7,398
|
How come your message headers like "From" and "Subject" don't appear on a new line, each? Without seeing your script, it is kind of hard to guess what the problem might be, but I wonder that it might not be that you are sending an incorrectly formatted email message? Each of those email message headers should be on new line. The ezMLM software is possibly unable to determine the From address because of your formatting???
Just a wild stab...
|
|
|
10-17-2001, 12:13 AM
|
Postid: 54959
|
|
Site Owner
Join Date: Mar 1999
Posts: 98
|
Thanks for the stab, but I think I figured it out. It's not really the From: header that matters. In order to subscribe name@domain the To: address needs to be
mylist-subscribe-name=domain@mydomain
|
|
|
10-17-2001, 12:19 AM
|
Postid: 54960
|
|
Developer
Join Date: Apr 2001
Location: Saskatoon, SK, Canada
Posts: 1,182
|
Re: (re-inventing the wheel)
Quote:
Originally posted by jelevin:
I tried Justin's suggestion, but the ez-mlm tries to subscribe webmaster@mydomain instead of the "From: " address.
Code:
Return-Path: <webmaster@childrensonline.org>
From: jlevin@usa.net
|
ezmlm tries to subscribe the envelope sender address (as indicated by the "Return-Path:" line above), and does not do any scanning of the headers for an email address. To subscribe an arbitrary address, as you discovered, send an email to list-subscribe-username=domain@yourdomain.tld
|
|
|
10-17-2001, 08:02 AM
|
Postid: 54973
|
|
Site Owner
Join Date: Mar 1999
Posts: 98
|
Thanks bruce. My project is to create e-mails inviting folks to subscribe containing clickable links in the form of
http://mydomain/cgi-bin/sub.pl?name@domain
Here's the perl script I put together. I wasn't sure about the e-mail validation part so it is commented out.
Code Sample:
#!/usr/bin/perl
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
$mailprog = "|/usr/lib/sendmail -oi -t -odq";
print
header,
start_html("Subscribe to Children's safetylist"),
h1("Subscribe to Children's safetylist");
if (my $error = validate_input()) {
print "Error: $error for $ENV{'QUERY_STRING'}";
print end_html;
} else {
show_thank_you();
print end_html;
mail_request();
}
sub validate_input {
#require Email::Valid;
#validate e-mail address if possible
#return "Bad email address syntax"
# unless Email::Valid->address($ENV{'QUERY_STRING'});
return; # undef says good
}
sub show_thank_you {
print "E-mail address is ", $ENV{'QUERY_STRING'};
$email = $ENV{QUERY_STRING};
$email =~ s/\@/=/;
#print "E-mail address is ", $email;
#print p, "Mail program is ", $mailprog;
print p, "Thank you! You should receive an email confirmation shortly.",
p, "To activate your subscription send a blank reply to this confirmation message.";
}
sub mail_request {
$email = $ENV{QUERY_STRING};
$email =~ s/\@/=/;
open SM, $mailprog
or die "Cannot launch sendmail: $!";
print SM <<END;
From: $ENV{QUERY_STRING}
To: safetylist-subscribe-$email\@mydomain.org
Subject: Subscribe to safetylist (from script)
(automatic e-mail)
END
close SM;
die "sendmail exited with $?" if $?;
}
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:49 AM.
|
| |
|
|
|