FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > Email & Mailing List Management
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-16-2001, 08:59 AM   Postid: 54907
jelevin
Site Owner

Forum Notability:
94 pts: Helpful Contributor
[Post Feedback]
 
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.
jelevin is offline   Reply With Quote
Old 10-16-2001, 03:15 PM   Postid: 54940
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
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
Justin is offline   Reply With Quote
Old 10-16-2001, 04:56 PM   Postid: 54944
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,672
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
Terra is offline   Reply With Quote
Old 10-16-2001, 09:46 PM   Postid: 54954
jelevin
Site Owner

Forum Notability:
94 pts: Helpful Contributor
[Post Feedback]
 
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.

Code:
This is an automated message from the 
safetylist@createsafety.net mailing list.

To confirm that you would like

   webmaster@childrensonline.org

...stuff deleted...

--- Below this line is a copy of the request I received.

Return-Path: <webmaster@childrensonline.org>
Received: (qmail 14750 invoked by uid 40101); 17 Oct 2001 01:38:20 -0000
Date: 17 Oct 2001 01:38:20 -0000 Message-ID:
<20011017013820.14749.qmail@six.futurequest.net> From: jlevin@usa.net To:
safetylist-subscribe@mlm.childrensonline.org Subject: Subscribe to
safetylist (from script)

automatic e-mail
Any suggestions?
jelevin is offline   Reply With Quote
Old 10-16-2001, 09:49 PM   Postid: 54955
sheila
Site Owner
 
sheila's Avatar

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
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...
__________________
sheila
http://www.thinkspot.net/sheilaruns/
sheila is offline   Reply With Quote
Old 10-17-2001, 12:13 AM   Postid: 54959
jelevin
Site Owner

Forum Notability:
94 pts: Helpful Contributor
[Post Feedback]
 
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
jelevin is offline   Reply With Quote
Old 10-17-2001, 12:19 AM   Postid: 54960
 Bruce
Developer
 
Bruce's Avatar
 
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
__________________
Bruce Guenter, FutureQuest http://www.FutureQuest.net/ http://untroubled.org/
Bruce is offline   Reply With Quote
Old 10-17-2001, 08:02 AM   Postid: 54973
jelevin
Site Owner

Forum Notability:
94 pts: Helpful Contributor
[Post Feedback]
 
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 $?;
}




jelevin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 09:26 AM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.