Gossamer Forum
Home : Products : Links 2.0 : Customization :

Newsletter Email Confirmation (NEW MOD!!!)

Quote Reply
Newsletter Email Confirmation (NEW MOD!!!)
Hi,

A while back I saw somebody come up with the idea to have the newsletter email a confirmation when people subscribe. I liked the idea and decided to take it to the next level. Enjoy =)

In subscribe.cgi...

1. Find sub subscribe
2. Find the following line "# Go to the success page."
3. ABOVE that line place the following code:
In Reply To:

##### newsletter email mod by innovationstudios.com
##### code start
%globals = (
my (%link) = @_,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title
);
my $to = $in{'email'};
my $from = $db_admin_email;
my $subject = $newsletter_subscribe_subject;
my $msg = &load_template ('email-subscribe.txt', \%globals);
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;
##### newsletter email mod by innovationstudios.com
##### code end
4. Find sub unsubscribe
5. Find the following line "# Go to the success page."
6. ABOVE that line place the following code:
In Reply To:

##### newsletter email mod by innovationstudios.com
##### code start
%globals = (
my (%link) = @_,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title
);
my $to = $in{'email'};
my $from = $db_admin_email;
my $subject = $newsletter_unsubscribe_subject;
my $msg = &load_template ('email-unsubscribe.txt', \%globals);
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;
##### newsletter email mod by innovationstudios.com
##### code end
In links.cfg

7. Find the following:
In Reply To:
# Email address of the administrator. BE SURE TO SET!
$db_admin_email = 'email@domain.com';
8. Below that add the following code:
In Reply To:

##### newsletter email mod by innovationstudios.com
##### code start
$newsletter_subscribe_subject = "Subscribed to our newsletter!";
$newsletter_unsubscribe_subject = "Unsubscribed from our newsletter.";
##### newsletter email mod by innovationstudios.com
##### code end
8. Create two files named "email-subscribe.txt" and "email-unsubscribe.txt". An example would be
In Reply To:
Hi,

You have been subscribed(or unsubscribed) to <%site_title%>'s newletter.

If you would like unsubscribe(or re-subscribe) go here:
<%db_cgi_url%>/subscribe.cgi


Thanks,

Links Manager
<%build_root_url%>
9. Upload your new subscribe.cgi, links.cfg, and text files. Text files should go in the templates directory and be CHMOD 666.


Hope this helps your site!

Ryan
http://www.innovationstudios.com

Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
No one likes the idea?

=)

Ryan

Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
This mod was made a while back.......but at least you made an effort Smile

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
Hi,

Yes, I took that idea and added onto it as I said.

Regards,
Ryan

Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
Ryan,

Nice job!

Thanks for the mod.

I really like it Smile

Madonna

Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
What is different in your version?

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
If I read you subject I would more expect a mod that would send an email to each subscriber with a verification code. The subscriber then would only need to click on the link to confirm his emailaddress.

....or has this type of mod a different name?


Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
Hi,

I believe the other mod only worked with subscribe, this one works for subscribe and unsubcribe. In addition, the email subjects can be controlled in links.cfg for users who don't like going into the actual code. Also, the actual email body itself is based on a template in the template directory. Another thing is that the <%site_title%> and <%build_root_url%> tags can be used in the templates. I realize this is a simple mod but i'm sure there are people who couldn't figure it out themselves!

Regards,
Ryan


Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
Nice mod Ryan - thanks for posting it for others.

Regards,
Mapo
Quote Reply
Re: Newsletter Email Confirmation (NEW MOD!!!) In reply to
Hmmm is this a template friendly mod? Ive had problems with trying to install this...

i get "missing title" when i try to load the suscribe.cgi in by browser.. any help will be appreciated. webmaster@mygaylinx.com =o)

It will only happen if you truly believe in it.
Quote Reply
Re: [RMS] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Hi RMS.

I like your newsletter email confirmation MOD a lot.

But it would be perfect if :

Everytime some joined or left the newsletter, webmaster´s e-mail got a copy of the confirmation.

That you could build a copy of those who left the maillist in a txt. file !

Is that somehow possible ?

Kim
God love simple things - Like Links
Quote Reply
Re: [RMS] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Is there a mod so when a person addeds a site, they recieve a validation link?

Thanks

intellie Crazy
Quote Reply
Re: [RMS] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Hello: I just installed this mod and now when anyone subscribes they get this error: "Unkown Tag: css"

The funny thing is the they do get subscribed but then receive this in the email: "Unkown Tag: css"

Any help would be great Unsure
"There's been an explosion! Your site has been inundated, and profits are going through the roof."
http://cbbomb.com

Host you BOMB on the server specifically designed for BOMBERS, CBBOMBER Domains and Hosting http://cbbomber.com
Quote Reply
Re: [taipan] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Do you have this: <%css%> somewhere in your code???


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Any Iea about the css unkown tag ?



Sincerly

Rym
Quote Reply
Re: [rym] Newsletter Email Confirmation (NEW MOD!!!) In reply to
In the mod from the first post, find this in steps 2 and 6, and add the red part.

%globals = (
my (%link) = @_,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $css

);

maybe...


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Thanks for your answer, But now I have a new problem

When I subscribe It give me a message "Unkown Tag: date"
Quote Reply
Re: [rym] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Under the css line just add, put this; date => &get_date Note the use of commas; you'll need to add one to the end of the css line, but not have one after the last item in the list.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Newsletter Email Confirmation (NEW MOD!!!) In reply to
Hi !
Thanks for your help ! It's worked now but I have also added time => &get_time
Because after the date error, it give the time error, so I have added this ligne, and all is ok now ! Great job !Sly