Jump to content

mvanrijnen

Members
  • Content Count

    471
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mvanrijnen

  1. We went from sending mail through smtp (office365) to the MS Graph interface. Basically, some rest services authenticated with OAUTH2 (register application in azure director), and sending message with json. (simple messages can go in 1 call, messages with big attachments take a bit more work). So with MSGRaph you can send as user with the user authenticating with OAUTH2, of send it from a registered application with clientid&secret etc. etc. user: sendMail - Microsoft Graph v1.0 | Microsoft Docs
  2. mvanrijnen

    any body can write this code by delphi?

    ..... or you ask Remy 🙂
  3. mvanrijnen

    any body can write this code by delphi?

    In that case, the code is not that difficult, as a Delphi developer you have to be able to do this for 99,9% on your own. So make your own code in Delphi, see if it works, if it doesn't, then post that Delphi code here for reviewing/tips/improvements.
  4. mvanrijnen

    any body can write this code by delphi?

    you gonna need more then that code translated to delphi, Probably there will be some authentication/authorisation) things needed before you can post your data. ah, another WhatsApp api, see here tuturioals enough for other languages: WhatsApp API gateway for sending messages and chatbot - Ultramsg
  5. mvanrijnen

    How to force update to label during a loop

    Try .ApplyStyleLookup
  6. Hi,just curious. Anyone experience with using PostgreSql in the cloud (eg google for example), for use in a Windows Desktop application? (have a small app, and the persons using it would like to use it on multiple locations, so i am looking for an easy way out 🙂.)
  7. yes, i already use only SSL, but i think i go another way. I'm thinking of writing a custom server (using e.g. MARS framework), and then use a service like ngrOK to expose the services. only figure out how to keep it 100% private, put a certificate or something with secrets in it.
  8. I know, but it's just a very small app (semi hobby). Besides that, i wonder if its so not done to go that direction (with which i basicly fully agree), why there are so many providers, exposing databases as a "cloudservice"? Other question, what would be the best way to make rest services available for a smapp app, (low cost), save and secure ? (at work we use radserver and all kinds of dedicated servers, firewalls, proxy's, certificates etc etc, can not do that for this small projetc) Without having to administer webservers, certificates etc. (somekind of appliance i can start in the cloud, upload a dll or cgi/isapi module and publish webservice, private&secure) (developed with Delphi, eg. MARS as rest framework)
  9. I discovered there are some more PostgreSQL cloud providers (dedicated or shared). I'm testing with one now, looks ok right now. (i want to prevent rewriting the app to using rest api's etc, instead of querying the DB directly),
  10. mvanrijnen

    Sending Email via GMail Using OAuth 2.0 via Indy

    got it working, just a reminder for people struggling with the large attachments and getting an invalid Content-Range header error: instead: hdr := 'bytes 0..199/200'; // example value MyRequest.AddParameter('Content-Range', hdr, TRESTRequestParameterKind.pkHTTPHEADER); use: MyRequest.AddParameter('Content-Range', hdr, TRESTRequestParameterKind.pkHTTPHEADER, [TRESTRequestParameterOption.poDoNotEncode]); (took only a few hours struggling 🙂, putting a proxy behind it, and see it in 1 minute )/
  11. mvanrijnen

    How can I move a window to the left edge of a monitor?

    following, same here, told the users to live with it for now 🙂 a solution would be nice.
  12. mvanrijnen

    Sending Email via GMail Using OAuth 2.0 via Indy

    ah, ok. did not had a change to try it. but we decided to go over to use the MS Graph API for outgoing emails. (as we can configure which email sending mechanism our sending services use, so could also be reverted back to smtp when needed).
  13. mvanrijnen

    Sending Email via GMail Using OAuth 2.0 via Indy

    Yes, so i mixed up some things. I was using OAuth2 as user identification, so with the login username/password and MFA authentication, then i got the token and logged in with that token. As i'm adapting some service applications, we have to use client_secret So i'm using the code from @Geoffrey Smith as starting point. I'v adapted it and i get a access token now, with the client_secret (grantype client_credentials), only thing is that the idSMTP.Authenticate does not authenticate with the returned access token. (Authentication unsuccessfull). some hints would be great ! 🙂 maybe i gonna try the sasl-oauth branch from @Remy Lebeau, but i'm a little scared that i then get all kinds of bumps to get another indy branche working. (but i will try this out). btw, is i use the access token generated by method with user/passw + 2fa, then i can send with smtp, found out why i have no success: on the doc page, where they explain smtp oauth2 with client_credentials; Authenticate an IMAP, POP or SMTP connection using OAuth | Microsoft Docs
  14. mvanrijnen

    Sending Email via GMail Using OAuth 2.0 via Indy

    Ok, i have a question, in this case i adapted our sending servers to use oauth. We are using office365/exchange online. But the clientsecrets generated in the Azure AD (AppRegistrations), what use are they? * I only have to use the application-id, and an account+password to generate the token. This generated token i put in a config for later use, but in the method i use now, the clientsecrets are never used?
  15. mvanrijnen

    Disable Event

    var oldevent : TNotifyEvent; begin oldevent := myComponent.OnExit; try myComponent.OnExit := nil; ..... your code here ... finally myComponent.OnExit := oldevent ; end; end; maybe expand the oldevent scope some more if you want to reassign in another method.
  16. mvanrijnen

    faster json library

    Yes, i use this one for a planner app we developed (inhouse use). No problems so far, ofcourse somehtings are sometimes slight different, but those guys know what their doing,
  17. I thought some of you might be interested in this: https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online
  18. I tried it with 2 almost empty forms in D11.1, with same method as TS, but the modalform stays appearing on top, after 50 times. Is TS using a specific componentset ? or does the subform do something with z-order ? (i last had some troubles with a specific componentset in D11.1 on Win11, where i had 2 click the closebutton of the "child" form twice to close, but they fixed that) ah, read over the styles part, try that also here now.
  19. From the manual: " caFree The form is closed and all allocated memory for the form is freed. " @TS, Maybe, maybe, FDetailForm.SetZOrder(True) would help. if i remeber there's also a winapi call to reset/refresh zorder of windows, i'll try to find that. (but big question is still why form goes behind mainform after couple of times)
  20. See this in the OP: In the Form Close of the TfrmAircraftTypesNew, i will have Action := caFree;
  21. mvanrijnen

    Change the background color of a TEdit

    Not personal, but there is a reason why we use a webbrowser instead of a TV set. I like to read this kind of things instead of watching YT 😉 (just a comment)
  22. Is not what the TP indicates with glhis post, what you post is not the question. You suggest first let the DB do it's work, retrieve that result, and on client side, overwrite that result with a clientside calculation?
  23. You'd better add calculated fields to the dataset, and use the OnCalcFields event. That way you can locally do then calculations, Use a slight different fieldname for the locally calculated, or same and don't fetch the calculated fields in the query.
  24. mvanrijnen

    MultiDisplay : choose specific display on boot

    Best to remember position instead of displaynumber (and windowmode (maximized or not)). You also want to check if the position you set your form on still is visible, user could have disconnect a display for instance., so you can make sure your app is visible on startup.
  25. mvanrijnen

    Community Edition expiring again, no new keys

    Yes, they have to put in a licensing model like VisualStudio, free to use (free version same as cheapest commercial version), and from a revenue of USD xxxxxxx (fill in a number), then you start paying. (okay, have to figure out internal licenses for internal development) How bigger the community the bigger the paying licenses, but give the people a full unrestricted product.
×