not able to setup outlook.com and gmail accounts which are 2 factor authentication enabled

How to configure outlook.com and gmail accounts which are 2 factor authentication enabled? I tried app passwords but did not work for me. Tried automatic setup and manual setup as well. Using eM client version 7.1.30508.0 on latest update of Windows 10