See this post about setting up an app password for your application to use
https://forum.xojo.com/t/send-email-with-attachment/70816