Assign tickets based on "To Address" or "From" address

Assign tickets based on "To Address" or "From" address

Hi,

I'd like to auto-assigne tickets based on "To Adress" : for example, if a customer knows my agent and send him a direct email with support adress in cc, i would like the newly open ticket to be directly assign to the agent.

Same thing using the "From Adress". If my agent send or reply to the customer using his mailbox and ccing the support adress, I would like to assign the ticket to him.

I've tried use "To Adress" contains "My_Agent_Adress" as a criteria for direct assignement but it does'nt work.

Am'I missing something ?