3

I'd like to include text in my mailings like:

This email was sent to [contact.the_email_used_by_mailing] ...

I am aware that I can use [contact.email] to bring in the primary email, but what if the bulk email is different? That could confuse a recipient so a thing that was meant to improve trust did the opposite.

Is there either

  1. A token to pluck out the same email as CiviMail would have chosen (i.e. the bulk mail one, or failing that the primary one)?

  2. A token to insert whatever email CiviMail is using (although this is only relevant to one off test emails, so is probably less useful)

Otherwise I'll write an extension that provides this.

1 Answer 1

1

This token doesn't exist as a CiviCRM token. However, if you're using Smarty rendering for CiviMail then you can use the Smarty tokens,which wil include the email address.

While Smarty rendering will add overhead to CiviMail, so does rendering non-contact tokens. I'm not sure which way will be faster - or if that matters to you.

2
  • What would be the smarty field for email in this case? {email}?(!) Aug 31, 2017 at 16:33
  • Nope, I can't find the token despite enabling Smarty rendering. Annoying you can {debug} in mailing templates! Sep 7, 2017 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.