Ecodev / newsletter

TYPO3 extension to send newsletter
https://extensions.typo3.org/extension/newsletter/
25 stars 26 forks source link

Unsubscribe problem #149

Closed socressor closed 6 years ago

socressor commented 6 years ago

Hello,

I've recognized the following problem : • Creating 2 fe_users with different fe_groups but same email • Put these fe_users in different recipient lists (or same...doesn't matter) • Send to the first recipient list and unsubscribe • Now I’m unsubscribed with both fe_users…but it should only unsubscribe for the user which have chosen

Thank you

PowerKiKi commented 6 years ago

Do they have the same email address ?

socressor commented 6 years ago

yes as I described before :)

PowerKiKi commented 6 years ago

Then what you see is the expected behavior as can be confirmed in code:

https://github.com/Ecodev/newsletter/blob/f0842b2351c5dab9c6b22ce30d7d7ae384edf6a1/Classes/Domain/Model/RecipientList/GentleSql.php#L47-L49

Semantically it makes senses too. If one real person don't want to receive anything, then we must unsubscribe all "copies" of his email address, otherwise he would still receive something. But you shouldn't have duplicated email addresses in the first place.

socressor commented 6 years ago

okay, is there a chance that you could add an hook or signal slot so we can edit this behavior? Thank you

PowerKiKi commented 6 years ago

I cannot see a good use case to justify a different behavior. So I'd rather not add a hook.

Instead I suggest you use a SQL RecipientList. That would give you a lot of flexibility out the box. And if you really need something very custom, then you can implement your own Ecodev\Newsletter\Domain\Model\RecipientList.