When using Outbound Email, before sending out the final email a number of test emails are sent and editors or marketing team keep asking IT if what they received was a test of the final email shot.

Is it possible to programmatically determine if an email is being Tested or Sent? We would like include a message in the emails to highlight Test emails.


Your templates are not being rendered when the e-mails are sent. The output is rendered only when you test the Mailing; it is then customized per Contact by the Mailer service when each individual e-mail is generated.

This ensures that what you have tested is exactly what you will send -- even if someone goes and changes the templates, pages, or content after the test.

So you cannot determine it programmatically. But there might be a simpler solution: test it using Contacts that have specific test data in them. That way it is obvious that it is a test e-mail -- and you also get to verify that your e-mail looks good with different kinds of data.

To do so, use a static Distribution List of test Contacts instead of just entering e-mail address(es) in the Test Mailing dialog.

  • thanks for the suggestion. This is exactly what we have been so far. The problem is people on the Static Test Distribution List also belong to the actual final distribution list and they have no idea of knowing if what they received is a test or not. Sep 13 '17 at 12:07
  • Might I suggest setting up some test e-mail accounts to use then? That way they don't get test e-mails clogging up their inboxes either :) Sep 15 '17 at 15:09
  • If we manually add a component to the page used in the mailing that adds a line of text saying "This is a test" and then once the testing is done, we remove this component from the page - would this work? Are changes to email contents (page or component level) automatically reflected when sending the email or does this change also require another test to be sent? Sep 19 '17 at 8:19
  • As I mentioned in my answer, any changes made after the test will not be used when sending. So no, that would not work. Your "This is a test" would end up in the final e-mails too. Sep 20 '17 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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