I think the problem is that Gmail by default closing smtp forwarding, so did you check the gmail settings ?
- In your Google/Gmail account, go to Settings - See all settings.
- Select the Forwarding and POP/IMAP tab.
- Under the IMAP access section, toggle on the option to Enable IMAP.
