8

I've configured several Transactional Templates to be sent from my SendGrid account via their handy Design Tool, which work great!.

However the Address Line and Unsubscribe links on the template footer aren't activated. In an email they display as placeholders, like so

                [Sender_Name]
[Sender_Address], [Sender_City], [Sender_State] 
                [Sender_Zip]

                Unsubscribe << (Not a Hyperlink)

I've followed SendGrid's documentation and configured my account address but am unable to find the solution for this.

Any ideas on this? Thanks for any input or guidance!

Clay Banks
  • 4,483
  • 15
  • 71
  • 143

2 Answers2

5

To get the unsubscribe to function you will need to create one or more unsubscribe groups. If you look under the Marketing menu you will see the sub menu to create those. Once you create one it will be assigned an ID number. When you are generating your email you will need to pass that ID value in as part of the EmailMessage object. If you are using V3 of the API you will be looking for SetAsm.

As for the Sender fields, for transactional templates they do not work correctly, as they are meant for marketing campaigns. Your two options are:

  1. Remove the Sender fields from that block in the template. Add a new text block above it with static values.
  2. Download the template into HTML and convert the sender objects into substitution variables. You will then be able to set them in your code when you are creating the email.

GitHub Bug

John Harbison
  • 51
  • 1
  • 4
4

The unsubscribe link will only appear if you create an unsubscribe group and specify it while sending using

      asm: {
        group_id: <the unsubscribe group ID>
      }
ehrencrona
  • 6,102
  • 1
  • 18
  • 24