Welcome Guest, Not a member yet? Register   Sign In
URI question
#1

[eluser]romenov[/eluser]
Hello,

I'm attempting to write a simple newsletter script, with the option (ofcourse) of signing out based on your email addy, so that it can be placed on the bottom of the email "follow this link to sign out www.link.com/signout/[email protected]

But it seems that URI doesn't allow an @ sign there, is there anyway that I can get this working like that?

tx!
#2

[eluser]Mirage[/eluser]
[quote author="romenov" date="1217864883"]Hello,

I'm attempting to write a simple newsletter script, with the option (ofcourse) of signing out based on your email addy, so that it can be placed on the bottom of the email "follow this link to sign out www.link.com/signout/[email protected]

But it seems that URI doesn't allow an @ sign there, is there anyway that I can get this working like that?

tx![/quote]


Hi there and welcome to the forums. It sounds like you want to make an opt-out link in an email newsletter? There are a plenty of options - below a few from the top of my head:

Make use of unsubscribe form
Don't do an immediate unsubscribe. Instead, link to a form that accepts an email address to unsubscribe.

Allow the '@' character in the url:
In config.php add this character to the 'permitted_uri_chars'

Encode the email address or use alternate identifier
If you have programming control over the unsubscribe link encode it to make the '@' char disappear - e.g. base64. Or don't use the email address at all and substitute an ID instead. Perhaps best, use both as parameters so you can test that email and ID match. This would improve security and prevent random unsubscribes (Unless you plan to use double opt-out).

Use a redirect page
IF you don't have programming control (e.g. use an email service), relay the request from a simple redirect script which doesn't use CI but just takes the URL, does the encoding and then redirects to the CI script.


HTH,
-m
#3

[eluser]romenov[/eluser]
Ok thanks,

I suppose it is better to use an unsubscribe form then.

Thnk you !!




Theme © iAndrew 2016 - Forum software by © MyBB