Prompt people before they unsusbcribe

It’s currently too easy to unsusbcribe accidently from emails. I would like to add a prompt on the unsubscribe page that people then have to click in order unsubscribe. Another option would be to provide a subscribe link, in case someone accidently unsubscribes themselves. Then they can easily resubscribe again.

Does anyone know how I may do this?

Can you please paste here the full unsubscribe link? I’d like to check the entrypoint so I can go look for it in the codebase. Thanks

This is the unsubscribe link here:

I’ve found where it gets called in F:\crm\crm\modules\EmailMan\EmailMan.php

I’m not sure where the template is though for the unsubscribe page. The message I see when I click the link is:

*You have elected to opt out of receiving emails.

Ok, nice find.

Let me teach you how I usually go about finding things in code. Starting from what you see in the UI, search Github repo:


There, you’ll find the name of the relevant LBL label, so next you search for that:


And there you have the place in the code responsible for the message you’re seeing on screen.

In this case, it’s so simple that it doesn’t even seem to be using any Smarty template, it just dumps the string on to the screen (honestly, I think it should use a template even here, and it wouldn’t hurt to make that screen better looking…)

Thanks for this. I appreciate the pointers.

It seems code changes won’t work if I create the RemoveMe.php file in the custom folder structure, so I’d need to edit the core code directly. I need to get something implemented quickly so was considering seeing if I could add a simple confirm button that when clicked would call the removeme link again, but with a check that the confirm button has been clicked first.

I think this is customizable, but not in that direct way.

What you’re trying to change is the entry-point definition:

And this can be achieved (never tried it, but I expect it will work) using the Extension mechanism:

Use the entryPointRegistry extension.

Thank you for the advice.
I ended up manually adding an ‘Opt In’ link within the email template with a mailto: containing a subject and body that allows people to easily send me an email if they mistakenly opt out, or if the email is forwarded to others and they choose to opt in.

1 Like

Is it possible to do it easily. I need this.