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.