Thank you all for your suggestions.
Turning on 2SV (2 step verification) and creating an app password (gmail account settings) to replace my usual connection password for my desktop outlook and in B4J code seems to work.
Outlook and my B4J program both work once again
note: google removed the option 'allow less secure devices'. I had to do this a while ago to fix it the first time pop/smtp failed for me.
another note:
I created a new yahoo email account and a new hotmail email account. Both accounts would not allow my desktop outlook program nor my B4J program to connect to the mail servers. This is why I asked about IMAP.
Sorry for the confusion.