filtering emails in folders

How to group emails for a particular email id like Sam’s mail should go to a folder named Sam.

Can contact me on fshaharyar@gmail.com

Hello,
you can make a rule like “All emails from your friend Sam to a special folder ‘Sam’s emails’”. Create and manage your rules by selecting Tools -> Rules…