How to exclude multiple email addresses from an order query When doing an order query I want to omit results for 2 particular email addresses.

It's easy enough to omit results for one address;

$order = Order::find()
    -&gt;isCompleted(true)
    -&gt;email('not email1@somedomain.com')
    -&gt;all();


But how do I omit more than one email? If I pass an array using ['not', 'email1@somdomain.com', 'email2@otherdomain.com'] then an error is returned stating that email expects a string.
For example, this doesn't work

$order = Order::find()
        -&gt;isCompleted(true)
        -&gt;email(['not', 'email1@somedomain.com', 'email2@otherdomain.com'])
        -&gt;all();


Nor does passing in an array of addresses within the array

$order = Order::find()
        -&gt;isCompleted(true)
        -&gt;email(['not', ['email1@somedomain.com', 'email2@otherdomain.com']])
        -&gt;all();


If I pass in 2 email criteria then only the latter is applied.

There has to be a neat way to do this.
Agree it'd be nice if it worked that way... I'm not sure why it doesn't, but replacing it with a regular where clause and not in works ok:

$order = Order::find()
    -&gt;isCompleted(true)
    -&gt;where(['not in', 'email', ['nobody@example.com','no@example.com']])
    -&gt;all();