Gossamer Forum
Home : Products : Links 2.0 : Customization :

Automatic confirmation to new subscribers of mailinglist

Quote Reply
Automatic confirmation to new subscribers of mailinglist
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:
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).]
Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
Good job...glad to see someone figured out a solution. (Not a big deal for me since I use another subscribe script, which has more features.) But this will be useful for other LINKS users. You should post this in the Resource Center.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
Since most sendmail programs do not allow you to send out to multiple recipients in the TO: line, you could do the following:

1) Copy the following codes (based on the codes that were posted in this Topic)...

Code:
my $to = $db_admin_email;
my $from = $in{'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;

2) Then put these codes AFTER the other codes posted in this Topic.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
How could you adapt this to send the administrator an email as well?

Thanks,

Cowboy
Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
Hi Eliot,

Works like a champ. Thanks for your help.

Cowboy
Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
Hi rsalomon,

Thanks for the mod. This puts a professional touch on the the subscription process.

Cowboy
Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
My pleasure Cowboy Smile

I thought it really sucked that it didn't have this feature, so I just snagged the code from add.cgi as you might have noticed. But just like I said.. it's a VERY simple modification

Anyway.. enjoy it. I might add new features later like a validate subscribsion (by clicking on a link saying subscribe.cgi?action=validate&email=blabla@blabla.no

------------------
Ronny Salomonsen <rsalomon@online.no>
Feline Medias

Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
Hi Ronny,

Looking forward to it. If I come up with any enhancements, I'll post them. Just can't seem to find the time.

Cowboy
Quote Reply
Re: Automatic confirmation to new subscribers of mailinglist In reply to
You're welcome, cowboy.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Confirmation E-Mail for Newsletter Subscribers In reply to
Strangely, not one of the posts in this thread (9 of them, previous to this) happen to include the word "newsletter" in any of their posts. This made searching for the cool mod very difficult indeed. It also caused certain posters to berate others for "not seaching thoroughly" on more than one occasion. So to avoid this, I'll make a list of keywords so this thread gets included in searches:

=============

This thread offers a mod or modification that allows subscribers who subcribe to the newsletter or news letter or mailing list to receive an email or e-mail confirmation / confirm . There are also instructions for sending the list owner or admin or administrator a copy or duplicate of the confirmation email. This is done by modifying the subscribe.cgi script.

=================

I hope that covers most possible search terms for this topic :)

The mod can be see at:
http://gossamer-threads.com/...ust&Number=49777

Quote Reply
Re: Confirmation E-Mail for Newsletter Subscribers In reply to
Yet..if you search for subscribe confirmation email, which is what you were looking for, this Thread DOES come up!

Wink

Regards,

Eliot Lee
Quote Reply
  In reply to
Deleted, starting to get off topic.
Quote Reply
Re: Confirmation E-Mail for Newsletter Subscribers In reply to
Do you want to end this??? It seems like you are attempting to get to the last word....sorry to disappoint you.

I agree that the search engine can be a difficult tool to find Threads and I appreciate your contributions to make it easier to find this particular Thread.

However, I do think that people should use the search engine more before posting duplicate Threads in the forums (in terms of bandwidth and also keeping track of Threads). And I do my best to help people find relevant Threads. It is interesting that SO many people have problems searching for information...I have only posted four Threads since October 1999 where I have asked for information or assistance. I have found MANY relevant Threads in the forums to address problems I've experienced with Links. guess it is matter of people getting to know search software or use them more to gain experience in how to tweak searches to find relevant information!

Regards,

Eliot Lee
Quote Reply
  In reply to
Deleted... we were getting WAYYYYY off topic.
Quote Reply
Re: Confirmation E-Mail for Newsletter Subscribers In reply to
In Reply To:
Do you want to end this??? It seems like you are attempting to get to the last word....sorry to disappoint you.
Was this really necessary? I don't know what was in the post this is in reply to since it was deleted but, I can assure everyone, when it comes to the last word, your friendly, neighborhood forum moderator will have it. Wink

No response necessary.

- Bobsie
bobsie@orphanage.com
http://goodstuff.orphanage.com/