Pages: 1
RSS
Regex to find one email in the TO line
 
Is there a way to make this macro work if there are other addresses on the to: line?

%SetPattRegExp="my-friend@gmail.com"%-%RegExpBlindMatch="%ToAddr"%-  %_match=%SubPatt(0)%-  %IF:"%_match"="my-friend@gmail.com":%RCPTCONFIRM
 
Try this one:
Code
%SetPattRegExp="(.*)(my-friend@gmail.com)"%-
%RegExpBlindMatch="%ToList"%-
%_match=%SubPatt(2)%-
%IF:"%_match"="my-friend@gmail.com":%RCPTCONFIRM

You should search entire To line, not the recipient address only (macro %ToList instead of %ToAddr)
Edited: Zygmunt Wereszczyński - 19 June 2026 01:09:47
Pages: 1