Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Unsubscribe per email

Quote Reply
Unsubscribe per email
Hi,

As I found out, it is not possible to unsubscribe from newsletter until you login.
Now That is a hassle. Lots of users negative feedback.

Is there a way to unsubscribe per email (just sending 'unsubscribe' back?)
Or a global that would do it ?

Thank you.

Mimi
<br>
::::::::::::::::::::::::::::::::::::::::::::::::::::::
http://www.rando.net/eng, the french trekking directory
Quote Reply
Re: [mimilamite] Unsubscribe per email In reply to
Hi,

Are you asking for a way that someone could unsubscribe via sending an email to something like mailing@yoursite.com, and it would then look up their email address and unsubscribe them? As far as I know, there is nothing around like that yet - but I could probably write something if/when I get a bit of free time

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Unsubscribe per email In reply to
Is there any way of unsubscribing easily without login ? most people have lost theirs and I don't want them to go through the lost password steps.

Mitia
<br>
::::::::::::::::::::::::::::::::::::::::::::::::::::::
http://www.rando.net/eng, the french trekking directory
Quote Reply
Re: [mimilamite] Unsubscribe per email In reply to
Hi,

I just had a look, and I can't see any settings that would allow that.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Unsubscribe per email In reply to
why not with a global, the way you did for deleting sql entries.
I'll try it out :

You receive an unsubscribe link per email
It links to a confirmation page with a form and email field -> POST
then

sub {
my $user_email = @_; my $sth = $DB->table("Users")->select( ['Username'], { Newsletter => "Yes" }, { Email =>$user_email });
while (my $email = $sth->fetchrow) { $DB->table("NewsletterSubscription")->delete( { UserID => $email } ); } }


Then, a template to do the global.
See, I'm learning from you ;-)

Mitia
<br>
::::::::::::::::::::::::::::::::::::::::::::::::::::::
http://www.rando.net/eng, the french trekking directory
Quote Reply
Re: [mimilamite] Unsubscribe per email In reply to
That wouldn't be too secure though, as people could easily change the username in the link, and un-subscribe other people Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Unsubscribe per email In reply to
I know but I'm confident no such thing will easily happen.

One could do it for one or two, but not for lots of them, it would mean they have all addresses.

I think I'll give it a try.
Does the global look good to you?
How much would you charge for the unsubscribe per email thing?

You can PM me if you like.

Mitia
<br>
::::::::::::::::::::::::::::::::::::::::::::::::::::::
http://www.rando.net/eng, the french trekking directory
Quote Reply
Re: [mimilamite] Unsubscribe per email In reply to
Hi,

Ok np.

You would wanna probably use something like:

do_user_unsubscribe
Code:
sub {
my $username = $DB->table('Users')->select( ['Username'], { Email => $_[0] } )->fetchrow || '';
if ($username) {
$DB->table("NewsletterSubscription")->delete( { UserID => $username } );
return { complete_unsubscribe => 1 }
} else {
return { failed_unsubscribe => 1 }
}
}

Then call in your template (lets say newsletter_unsubscribe_email.html) with:

Code:
<%do_user_unsubscribe($email)%>
<%if complete_unsubscribe%>
You have been successfully unsubscribed
<%elsif failed_unsubscribe%>
Sorry, you could not be unsubscribed
<%endif%>

Then in your newsletter email, you would put something like:

Code:
Unsubscribe here: <%config.db_cgi_url%>/page.cgi?p=newsletter_unsubscribe_email;email=<%Email%>

Hope that works

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Unsubscribe per email In reply to
Andy,
llooks fine, except the
Unsubscribe here: <%config.db_cgi_url%>/page.cgi?p=newsletter_unsubscribe_email;email=<%Email%>
is not parsed : email and config.db_cgi_url are not replaced.


I'll test the global now.
Mitia
<br>
::::::::::::::::::::::::::::::::::::::::::::::::::::::
http://www.rando.net/eng, the french trekking directory
Quote Reply
Re: [mimilamite] Unsubscribe per email In reply to
the gobal works great.
Many thanks.

Still on the parse thing.

Mitia
<br>
::::::::::::::::::::::::::::::::::::::::::::::::::::::
http://www.rando.net/eng, the french trekking directory
Quote Reply
Re: [mimilamite] Unsubscribe per email In reply to
mimilamite wrote:
Andy,
llooks fine, except the
Unsubscribe here: <%config.db_cgi_url%>/page.cgi?p=newsletter_unsubscribe_email;email=<%Email%>
is not parsed : email and config.db_cgi_url are not replaced.

Ah weird... maybe just try <%db_cgi_url%> (could be that <%config.xx%> are not available in those emails)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!