Jasja 3 Posted April 21, 2021 Hello, I'm a long time user of Overbyte ICS Internet Components. I'm working on a automatic email system and I want to use the TIcsMailQueue for that. I'm looking into the Mail Queue Component Demo v8.66 from Januari 2021, but I'm unable to set it up using gmail as SMTP Server. Is somebody able to help me how to setup the demo using gmail? Thanks for any feedback. Regards, Jasja Share this post Link to post
Angus Robertson 574 Posted April 21, 2021 You don't say what response Gmail is providing when you send email Google Gmail accounts have two levels of security, historically they worked with clear authentication under SSL, and one of mine still does. But if you choose a Google prompt to set 'higher' security on your account that means they will only support OAuth2 so the account password is not stored locally or sent in SMTP commands. Instead the password is entered through a browser window. So for the ICS mail queue component, specify authentication as XOAuth2 and the password field will be greyed. When you start the mail queue, a browser window will appear in which you login with the same account as the user name here. Google returns two tokens, one is used to access Gmail and remains valid for a short time, the second refresh token is saved by the sample as the password and can be used in the background to get a new access token without a browser window. The refresh token usually remains valid for months, unless the account details are changed, but if you are sending unattended emails you need some scheme to allow interaction to login again if new tokens are needed. Before OAuth2 will work, you need a Google application account which is explained in notes at the top of OverbyteIcsSslHttpRest.pas. Angus Share this post Link to post
Jasja 3 Posted April 21, 2021 Hello Angus, Thank you very much for your explanation, I created a Google gmail OAuth token as explained in OverbyteIcsSslHttpRest.pas And the Queue Demo is working now! Jasja Share this post Link to post