info.mailtraq.com > Management > Script Functions A-Z > MsgGetRcpts() MsgGetRcpts()Returns a comma separated list of the message recipients specified in the routing fields of the current message – directly analogous to the forward path of the SMTP envelope. The message recipients are not necessarily the same as those specified in To: or Cc: headers. Local recipients may not have the domain part of their e-mail address specified.
list := MsgGetRcpts()
- list
- A comma separated list of the message recipients.
Send message to 'suspect junk' mailbox if To: and Cc: headers don't match message forward path rcpt_list := MsgGetRcpts();
rcpt_match := "FALSE";
For(rcpt_list, "rcpt",
If(WildcardMatch(Header("To") ++ " ", "*" ++ rcpt ++ "*"),
rcpt_match := "TRUE",
If(WildcardMatch(Header("Cc") + " ", "*" ++ rcpt ++ "*"),
rcpt_match := "TRUE"
)
)
);
If(Not(rcpt_match), MsgSetRcpts(AddressOf("junk"))) |