Current location: Hot Scripts Forums » Programming Languages » Perl » Unsubscribe URL


Unsubscribe URL

Reply
  #1 (permalink)  
Old 08-03-03, 09:44 PM
NotherNewbie NotherNewbie is offline
New Member
 
Join Date: Aug 2003
Location: USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Unsubscribe URL

Well, here we go...

I am completely new to this, but I will try to explain this as conscisely as possible...

I got a free mailing list subscription program. In it are two cgi scripts, one to subscribe (subscribe.cgi) to the mailing lists and the other to mail the message (mailer.cgi).

The subscribe script does magical stuff to create a unique unsubscribe url, (using the email address, an id number, and the list(s) subcribed to, for each member of the list.

My challenge is that I would like to recreate that unique url at the bottom of each message sent through the mailer script. I know where to put the code, but don't know what code to put in there. I am beginning to suspect that it is going to take more than one line of code to do this????

The unsubscribe url is composed of the e-mail field, the id field, and the list field from the text file, mailing_list.

Here is part of the code from the subscribe.cgi:

open(LIST, ">$MAILING_LIST")
or error_page("Cannot open $MAILING_LIST: $!\n");
print LIST $buffer;
print LIST "$email:$id:".join(",", @lists)."\n";
close LIST;
$template = new Perlfect::Template($TEMPLATE_ADD_PAGE);
$cast{name} = $name;
$cast{email} = $email;
$cast{list} = $list;
$cast{id} = $id;
$cast{unsubscribe} = "$INSTURL/subscribe.cgi?op=remove&email=$email&id=$id&list=$ list";



What can I do to generate the unique url inthe mailer program?

Help! My family misses me (too many late nights tryingto figure this out...)

Danielle
Reply With Quote
  #2 (permalink)  
Old 10-04-03, 10:02 PM
rob2132 rob2132 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: USA
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by NotherNewbie
Well, here we go...

I am completely new to this, but I will try to explain this as conscisely as possible...

I got a free mailing list subscription program. In it are two cgi scripts, one to subscribe (subscribe.cgi) to the mailing lists and the other to mail the message (mailer.cgi).

The subscribe script does magical stuff to create a unique unsubscribe url, (using the email address, an id number, and the list(s) subcribed to, for each member of the list.

My challenge is that I would like to recreate that unique url at the bottom of each message sent through the mailer script. I know where to put the code, but don't know what code to put in there. I am beginning to suspect that it is going to take more than one line of code to do this????

The unsubscribe url is composed of the e-mail field, the id field, and the list field from the text file, mailing_list.

Here is part of the code from the subscribe.cgi:

open(LIST, ">$MAILING_LIST")
or error_page("Cannot open $MAILING_LIST: $!\n");
print LIST $buffer;
print LIST "$email:$id:".join(",", @lists)."\n";
close LIST;
$template = new Perlfect::Template($TEMPLATE_ADD_PAGE);
$cast{name} = $name;
$cast{email} = $email;
$cast{list} = $list;
$cast{id} = $id;
$cast{unsubscribe} = "$INSTURL/subscribe.cgi?op=remove&email=$email&id=$id&list=$ list";



What can I do to generate the unique url inthe mailer program?

Help! My family misses me (too many late nights tryingto figure this out...)

Danielle

Try rand() with various characters (alphanumeric) to generate a unique value. Did you get this figured out from the time you last posted this?
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 03:58 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.