Jump to content

J23

Members
  • Content Count

    29
  • Joined

  • Last visited

Everything posted by J23

  1. Hello, does ICS allow to send mail from Office365 account using the Exchange Web Service protocol? I want my app to be able to send emails from my Office 365 account. To start with, I decided to try GMail and SMTP. Thanks to ICS it was easy. I decided that now I will only change the configuration and send an e-mail from O365. Failed to. For O365 SMTP does not work even in Outlook (desktop). A few days ago I found out from MS technical support that now I can only send mail using Exchange. Is it true? Thanks for any help. J23
  2. J23

    ICS V9.0 announced

    I have already changed and installed it successfully. Previous versions installed perfectly - I still admire your perfection. Regards, J23
  3. J23

    ICS V9.0 announced

    But in the package there is a folder ..\Lib\Debug\Win32 and in it D7 and D2006. D2010 is not there. This also applies to the Release folder.
  4. J23

    ICS V9.0 announced

    This is valuable information, but I don't know what to fill this folder with. It is missing from the icsv90.zip package. 😉
  5. J23

    ICS V9.0 announced

    There is no folder: ...\Lib\Debug\Win32\D2010 in version 90, so copying from there is not possible. Is the error a missing folder or a copy command?
  6. J23

    ICS V9.0 announced

    Thank you very much for your answer. Tomorrow I will check on the old computer whether after uninstalling the previous version I can install the new one. J23
  7. J23

    ICS V9.0 announced

    Hello, I cannot install this new version in Delphi 2010, Windows11. I receive the error: "Checking project dependencies... Compiling OverbyteIcsD2010Run.dproj (Debug configuration) [DCC Warning] OverbyteIcsD2010Run.dpk(190): W1033 Unit 'SHDocVw' implicitly imported into package 'OverbyteIcsD2010Run' [Exec Error] The command "cd .. if not exist Lib\Debug\Win32\D2010 mkdir Lib\Debug\Win32\D2010 if not exist Lib\Release\Win32\D2010 mkdir Lib\Release\Win32\D2010 copy Source\OverbyteIcsTnOptFrm.dfm Lib\Debug\Win32\D2010\OverbyteIcsTnOptFrm.dfm copy Source\OverbyteIcsOAuthFormVcl.dfm \Lib\Release\Win32\D2010\OverbyteIcsOAuthFormVcl.dfm copy Source\OverbyteIcsTnOptFrm.dfm Lib\Release\Win32\D2010\OverbyteIcsTnOptFrm.dfm copy Source\OverbyteIcsOAuthFormVcl.dfm Lib\Release\Win64\D2010\OverbyteIcsOAuthFormVcl.dfm" exited with code 1.." I didn't have an older version installed, so I didn't need to uninstall it. I later tried to install version (8.58) and it worked. What could be the reason for the problem with version 9.0? Regards, J23
  8. I updated ICS. "WebBrowser Title: Could not connect to this page." With a different Redirect-URI for example http://localhost:8080/microsoft/ I get the message: AADSTS50011: The redirect URI 'http://localhost:8080/microsoft/' specified in the request does not match the redirect URIs configured for the application '8... Azure settings attached. Of course, in Azure I also added such a setting - then there was a message as above. "Could not connect to this page." Did I understand correctly, can I send more details to your private email? J23
  9. Hello Angus, I am very grateful for your time. I tried to run the program on another computer, I removed the entire package and reinstalled. Nothing has changed. There was only one problem during the installation: I had to manually add the path to the file OverbyteIcsSuperXMLParser.pas I'd like to ask a few more questions: - the program didn't ask for certificates but maybe I should create some certificates? - are the settings visible in the REST Settings attachment sent yesterday are correct? - maybe unlucky compilation in Delphi2010 causes some unusual problems? - Maybe change the port to something other than 8080? - Is there a compiled (exe) version of this program available somewhere? I know it's dangerous, but I'm determined to try all the options 😉 - I'm signing in with a trial Microsoft 365 work account - Microsoft 365 Business Basic - it doesn't matter? J23
  10. Sorry, I don't understand, there are no spaces in https://graph.microsoft.com/Mail.Send Now I only use the single one, and this Scope is accepted, in the app with EASendMail component. All additional characters are placed by the OverbyteIcsHttpRestTst application. J234
  11. Thank you very much Angus for your support. Unfortunately, it didn't help. In the meantime, I tried in that application using EASendMail to apply: scope = 'https://graph.microsoft.com/Mail.Send' and it works fine too. I noticed a strange thing: authentication requests sent from these apps are slightly different: (xxxx replaces long codes here) EASendMail (browser bar): https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&scope=https://graph.microsoft.com/Mail.Send&redirect_uri=http://127.0.0.1:60432&client_id=xxxx&prompt=login OverbyteIcsHttpRestTst: (Debugger -BrowserURL text from OverbyteIcsSslHttpOAuth unit) https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id=xxxx&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080&state=ICS-17630046&scope=https%3A%2F%2Fgraph.microsoft.com%2FMail.Send but the browser bar shows much more: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id=xxxx&redirect_uri=http%3a%2f%2f127.0.0.1%3a8080&state=ICS-17630046&scope=https%3a%2f%2fgraph.microsoft.com%2fMail.Send&sso_nonce=xxxx&client-request-id=xxxx&mscrid=xxxx Browser behavior is also different: EASendMail: Requests MailAddress, Password and SMS verification OverbyteIcsHttpRestTst: It requests MailAddress, Password and without SMS verification shows message: "Failed to Generate App Token............." The "............." looks like it's Authorization Code Even the login windows are slightly different graphically. Completely lost, J23
  12. Hello, It's been a few months and I've tried to get back on topic. However, now I managed to clear some doubts and my question is a bit more precise. I used the trial version of the EASendMail control. I was able to send the mail, so now I am sure that my application registration and its settings in Azure are correct. And here the problem arose. At first I thought I also verified all URIs, URLs, etc. are correct. However, the same settings applied to the Overbyte Demo did not allow me to get a Token. In the version with the EASendMail control, I have: clientID = .... clientSecret = ... scope = 'https://graph.microsoft.com/Mail.Send%20offline_access%20email%20openid'; authUri = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize'; tokenUri = 'https://login.microsoftonline.com/common/oauth2/v2.0/token'; httpListener.Create1('127.0.0.1', 0); redirectUri := Format('http://127.0.0.1:%d', [httpListener.ListenPort]);//http://127.0.0.1:51034 authorizationRequest := authUri; authorizationRequest := authorizationRequest + '?response_type=code&scope=' + scope; authorizationRequest := authorizationRequest + '&redirect_uri=' + redirectUri;//http://127.0.0.1:51034 authorizationRequest := authorizationRequest + '&client_id=' + clientID; authorizationRequest := authorizationRequest + '&prompt=login'; browserUi.OpenUrl(authorizationRequest); httpListener.GetRequestUrl(-1) requestUri := httpListener.RequestUrl; //have the AuthorizationCode! httpRequest := TServerXMLHTTP60.Create(nil); tokenRequestBody := 'code=' + code; tokenRequestBody := tokenRequestBody + '&redirect_uri=' + redirectUri; tokenRequestBody := tokenRequestBody + '&client_id=' + clientID; tokenRequestBody := tokenRequestBody + '&grant_type=authorization_code'; httpRequest.setOption(2, 13056); httpRequest.open('POST', tokenUri, true); httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); httpRequest.send(tokenRequestBody); while( httpRequest.readyState <> 4 ) do httpRequest.waitForResponse(1); status := httpRequest.status; //=200! result := httpRequest.responseText; //have the Token! ********************************************************************************* What am I setting wrong in OverbyteIcsMailQuTst? When I try to "Login to App" with above Scope I get the message: AADSTS650053: The application xxx asked for scope 'Mail.Send%20offline_access%20email%20openid' that doesn't exist on the resource '00000003-0000-0000-c000-000000000000'. Contact the app vendor. Previously, I tried the default Scope setting: https://graph.microsoft.com/Mail.Send Then I get the message: Failed to Generate App Token but now the Authorization Code appears! Thank you in advance for any help. I feel like I'm going round in circles. J23
  13. Neither GMail nor Microsoft allow Basic authentication https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online The exception is the use of Application password, but my University that uses Office 365 mail does not agree to this solution. By the way: MS Technical Support says that the Outlook application cannot be configured to send mail (Microsoft account) using SMTP - i tried and i didn't make it.
  14. Thank you, I know that, but problem is IMHO with modern authentication - OAuth2 or using the graph.microsoft.com and as Angus said with Azure permission settings. J23
  15. MS is the master of complications 😉 As I wrote earlier, sending an email with the help of ICS (SMTP, OAuth2) from the GMail account was successful without any problems. I tried using MS Technical Support and got conflicting answers from various consultants.
  16. Hi, I tried but couldn't send an email. In the Send Email tab, I entered: - From: my personal Outlook mail address - Recipients: my another mail address In the Email Settings tab, I entered: - Email Provider: Microsoft REST APIs - MS User Autority: Consumers - App Client ID: App value from Azure - Client Secret: App value from Azure - Email Account: my personal Outlook mail address - OAuth Authentication: Local Web Server I left all other fields unchanged. Should I enter anything else? I tried to run (Email Settings tab): Test Redirect button - Test Redirect OK Login to Email button - Browser shows message (without login screen): "unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=2083908." After change - MS User Autority: to common Login to Email button - Browser shows login screen, but when I tried to log with my personal Outlook mail address I was rejected with message: "You cannot log in here with your personal account. Use a work or school account instead." What am I doing wrong? The user of my application should authenticate the sending of the email with his data. Tried logging in with my Azure account details but of course no luck either. Thanks in advance for any help. J23
  17. Thank you very much, I was looking there: http://www.overbyte.eu/frame_index.html and and there the latest version is from 2018 (signed: latest release) ;-( Now, I have downloaded the latest version and will check. Thanks again, J23
  18. Thanks for your reply. OverbyteIcsHttpRestTst,dpr successfully sends mails as OAuth2 from GMail - not from O365. It uses two components: HttpRest and RestOAuth. But I've not found TIcsRestEmail component. Would you be so kind as to tell me where to find it (and how to use it)? Inside this example, there is no such component. I've downloaded ICS-V8.58 (Nov, 2018). J23
  19. Maybe I didn't understand something?: https://www.emailarchitect.net/easendmail/kb/delphi.aspx?cat=15 "Exchange Web Service (EWS) Exchange Web Services (EWS), an alternative to the MAPI protocol, is a documented SOAP based protocol introduced with Exchange Server 2007. We can use HTTP or HTTPS protocol to send email with Exchange Web Services (EWS) instead of SMTP protocol. I only suggest that you use EWS protocol in Exchange 2007/2010/2013/2016 or later version. Office365 also supports EWS very well."
  20. Thank you for your reply. I've tried so many options that until I configure any mail application I won't even believe Mr. GPT 😉 Please note that in Outlook, my account configures itself as Exchange instantly. This means that I am the legitimate owner of this account. Why not SMTP?
  21. I read a lot of materials on this topic, and finally decided to try the simplest solution - Thunderbird and Outlook applications. In both cases, it's easy to set up IMAP - it works In both of these programs. But I was unable to send an e-mail using SMTP. I don't need any license for this.
  22. J23

    Sending Email via GMail Using OAuth 2.0 via Indy

    I tried and failed. I think I have the HTTPrequest correct: pasted directly into the browser it brings up the login window. After user accept, the browser reports the inability to connect to the localhost server. How to call default browser and receive response to get AuthCode? Of course without using REST. Once I get the AuthCode, I'll call IdHHTP.Post method and get the Token - that shouldn't be a problem. J23
  23. J23

    Sending Email via GMail Using OAuth 2.0 via Indy

    Has this example changed so that it will now work in Delphi 2010? I have downloaded it and IMHO the Rest libraries are still needed.
  24. J23

    Sending Email via GMail Using OAuth 2.0 via Indy

    It works, OAuth2 mail sent and received! Thank you very much Remy. Now maybe I'll try to get a token using IdHTTP ;-) Regards, J23
  25. J23

    Sending Email via GMail Using OAuth 2.0 via Indy

    Good morning again. After an unplanned break, I'm back to the problem. I tried to get the token as you advised using TIdHTTP but I don't know how to do it without REST libraries (Delphi 2010). Finally, I installed ICS (overbyte.be) and with the help of the RestOAuth component I was able to get the token. I still don't know what to do next: how to use the token, IdSASLXOAuth21 and IdSMTP to send an email. J23
×