How to send email from my delphi application

Roni Lev 1 Reputation point
2024-10-06T07:26:35.0766667+00:00

Hello Microsoft Support,

We have a garage management software, a desktop application written in Delphi, which is installed at many customer sites.

We want to enable our customers using the software to send emails through it. Until now, this was done using OLE with Outlook. However, in the new Office, there is no support for OLE, so we want to switch to the Graph API.

What is the best way to do this? I have registered the application on the Microsoft site and I am able to obtain a token, but I am failing to send emails.

How can I configure each client to specify which Microsoft user is sending the email?

Best regards,

Roni Lev

Tevel Software ltd

******@tevelsoft.co.il

Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-10-07T06:11:03.29+00:00

    Hello Roni Lev,

    Thank you for reaching out to Microsoft Support!

    There are two ways to send email using the Graph API, either with delegated permissions, which require an interactive user login, or with application permissions, which do not require a user login, depending on your needs.

    The console application is provided with a variety of code that sends requests to the Graph API.

    See the documentation for details:

    https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http

    https://learn.microsoft.com/en-us/graph/tutorials

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.