PDA

View Full Version : Unsubscribe URL


NotherNewbie
08-03-03, 10:44 PM
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

rob2132
10-04-03, 11:02 PM
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?