How to send email through client id and secret with tenant id instead of SMTP in PHP Laravel 9 technology

Chandrakesh Pandey 1 Reputation point
2025-01-17T12:45:45.8666667+00:00

Hi ,

I am developer , i want to send email through the client id and secret with tenant id without SMTP ,
Can you please tell me that how to send email to any other person like ******@gmail.com in PHP Laravel 9 technology ,

Or provide any reference so that we can do .

.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,330 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kavya 490 Reputation points
    2025-01-18T13:40:39.2366667+00:00

    You can use the Send-MgUserMail cmdlet or Graph API.

    If you prefer Graph API (Code sample available in PhP too), check the below link.
    https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=php

    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.