Compares fields against the envelope
The envelop is equivalent to the mail delivery protocol. So it does not test against a real header. Instead uses trace information from the mail delivery protocol for specific values.
A "to" tests the SMTP sender field "RCPT TO" a "from" the recipient "MAIL FROM".
It is the most reliant way to test from which address a message was send to or received.
Compares headers against constant strings.
You typically use this test with headers containing subject line or a spam score.
Do not use this test, if the header should be matched against a mail addresses. The result will be unrealiable, as this test is not aware of display names. Use the address test instead.