Ok, need one hook after SUCCESS move_del + mark + show/preview & before send (because that need add command before write).
That change should not be necessary. $RCMAIL->output->command() should pass the command to the parent window automatically. If it doesn't for some reason, the command logic should be fixed and not work-arounded like this.
I am test, this no truth.
Without set parent in framed output:
rcmail.set_unread_count("&BBIEQQRP- &BD8EPgRHBEIEMA-",6,false,""); if(window.parent && parent.rcmail) parent.rcmail.set_env({"sieve_headers":[["Subject",
With set parent in framed output:
if(window.parent && parent.rcmail) parent.rcmail.set_unread_count("&BBIEQQRP- &BD8EPgRHBEIEMA-",5,false,""); if(window.parent && parent.rcmail) parent.rcmail.set_env({"sieve_headers":[["Subject"