How do I send a customised auto-responder message?

  1. Home
  2. Knowledge Base
  3. GMS
  4. How do I send a customised auto-responder message?


During the Christmas holiday season the company I work for will be closing until the start of the New Year. I would like inbound e-mail messages to be processed as normal but would like a way for the server to send out an
automated response back to the sender of each inbound message.

Is this achievable in GMS?


As well as the standard ability to set up autoresponders (or holiday messages) on accounts within GMS it is also possible to automatically produce messages using the MML scripting language.

The following piece of MML script will send an email message:

if (emailX-DetectLoop != 1)
msg = MsgCreate("null@domain.dom",   emailfrom,   ("RE:" & emailsubject));
if (msg)
MsgAddHeader(msg,  "X-DetectLoop","1");
MsgAddBody(msg, "First line of message body");
MsgAddBody(msg, "Second line of message body");
MsgClose(msg, MSG_SEND);

It uses the FROM address and SUBJECT of the inbound message in order to create the outbound message. The reply address should be set to an appropriate address. If you want to lose any replies to this message, use “null@yourdomain”, alternatively you could put any other email adddress in.

Note that there is an extra header clause added (X-DetectLoop) – this is important because it will prevent message loops within GMS.

The script itself can be used in several places within GMS. If used as a user script, it will work in a similar way to the standard auto-responder. Alternatively it could be placed in one of the MML script locations in SMTP (e.g. The EOM Script, you will need GMS Anti-Spam. to allow this). In this case, it would cause a response to be sent for every message sent to the server.


  • To prevent clients replying, you can add the additional line:


  • The function FilterMsg() could be used to look for keywords. This will allow an “intelligent” response to be sent back.

See Also:

Keywords:mml autoresponder response smtp reply automatic

Was this article helpful?

Related Articles