I want to add a ‘flag link’ in an email. I have an event content type, and every time a new event created, the users get an HTML Email. I have a flag that the users can flag this event if they want to attend. I want to embed the flag link in the email, so that the users click the link and redirected to the flag confirmation page.
I’ve tried that with flag_create_link()
in the email-template but it has two problems that makes it unusable in an email. First, I’m getting ‘Bad token’ error if click the link in the Email. Second, the URL generated is a relative URL, so I had to manually change the URL in browser to test, which got me to the first problem.
Is there any proper way to embed a flag link in an Email? So that, the user can click and directed to the confirmation page of the flagging, or login page if he’s not already logged in.
UPDATE:
I’ve changed the link type to ‘confirmation form’ and that solved the first problem. I’m not getting ‘Bad token’ error anymore. However, the link path is still relative.
Sponsored by SupremePR