Contact email in email button link

Hello,

I’m trying to build an email with a button. This button should pass the contact email in the url, so I’ve added this link http://mysite.com/test?email={leadfield=email|true} to Button Link property and I expected to have the {leadfield=email|true} replaced by contact email but it does not work: how to figure out this issue?



Thank you

Hello,
I’m trying to build an email with a button. This button should pass the contact email in the url, so I’ve added this link http://mysite.com/test?email={leadfield=email|true} to Button Link property and I expected to have the {leadfield=email|true} replaced by contact email but it does not work: how to figure out this issue?

Thank you

I did something like this and it works. Have you tried to leave out the “true” parameter?

Yes I did and it didn’t work. The link I get in the email is always http://mysite.com/test?email=[Email]

Please try something like this…

http://mysite.com/test/?unsub=1&email={contactfield=email}

…where unsub=1 is just a dummy parameter you don’t need to evaluate. BTW, how do you evaluate the parameter? Are you putting it to a form on the target page? Or do you use PHP?

Hello I tried but it still does not work. I always send me a test email so I tried to send the email using a test campaign without result. I opened the email in browser and I noticed the button link in the email has been transformed to &email={contactfield=email} to &email=[Email]

The [Email] thing is correct in the email preview. It should be replaced with the correct value when you send it out however.

Ok, I fixed it. I was using the wrong email type, now everything works fine. Anyway I evaluate the params using PHP.

Thank you for your help.

@Jan72, what does wrong email type mean?

@PeterTL Is that a neat way you have developed to force an unsubscribe using some commands in the test file.
if so would you be interested in sharing… i love to program new things with mautic… and maybe we could share some new ideas. Thanks

@tommytx123:

My unsubscribe mechanism is pretty simple. I provide a personalized email link which redirects the contact to a simple page where he has to input his first name, last name, email and - most important - an optional text field to provide feedback on unsubscribe motive. As the contact should not input his data manually, I am passing parameters to the unsubscribe page. From there, the unsubscribe is handled via form actions.

The unsub=1 thing is just a workaround. When I first implemented the mechanism, it was not possible to use the email address in the first position of URL parameters (maybe a bug). That’s why I added a dummy parameter. In fact, the URL looks something like ...unsubscribe/?unsub=1&email=... but the unsub=1 has no functionality.

Thanks…@PeterTL I just asked a simple question just now on the forum … i am sure you know the answer… could you look please?
https://www.mautic.org/community/index.php/8495-can-we-email-communicate-inside-mautic