0
votes

I'm using the Sendgrid PHP library and I want users to be able to unsubscribe when I send them emails using transactional email templates with Sendgrid.

When adding the "Unsubscribe" module in my template, then it looks all empty and without the unsubscribe link when I send it:

enter image description here

Is it possible to make the template display the right unsubscribe link?

Note I do not want to use the "Settings > Tracking > Subscription Tracking" option as that can't be added in the template and looks quite bad outside it.

1

1 Answers

2
votes

You'll still want to use "Subscription Tracking" in the Settings section of SendGrid. The difference is you'll use the Replacement Tag: Subscription Settings - "Replacement Tag"

I've set it to %unsub_url% and can use it in an email like:

<a href="%unsub_url%"/>Unsubscribe</a>