How do I prevent loops when using MML scripts?

  1. Home
  2. Knowledge Base
  3. GMS
  4. How do I prevent loops when using MML scripts?

Question

When I add a script in GMS Anti-Spam (an End Of Message script), the message is duplicated about a dozen times?

Answer

This can be caused for a number of reasons. When writing an EOMScript you should place the following around the script:


if (emailX-MMLScript == "")
{

/* Script Here */

}

This is because once GMS has passed the message through the script, an X-MMLScript header is added. If the message then passes through GMS again it ignores the script.

Keywords:Loops MML X-MMLScript

Was this article helpful?

Related Articles