IF you are using modern auth, then some app registration and consent would be required:
Send mail using SMTP with authorization
Naresh kumar
40
Reputation points
Hi Guys,
I have been looking for a solution to send automated mail using smtpclient - 'smtp.office365.com'.
We need to send mail without any user interaction or any admin consent. Is it even possible? (Note: needed authentication for Hybrid scenario - modern authentication) Please let me know if I need to provide any additional details
Thank you in advance
Developer technologies ASP.NET ASP.NET Core
4,815 questions
Microsoft Security Microsoft Entra Microsoft Entra ID
25,081 questions
Microsoft Security Microsoft Graph
13,721 questions
Accepted answer
-
Andy David - MVP 157.4K Reputation points MVP Volunteer Moderator
2024-10-16T11:34:02.5866667+00:00
1 additional answer
Sort by: Most helpful
-
Ian C 1 Reputation point
2024-10-16T10:00:38.75+00:00 Do you mean the .NET SMTPClient?
If so, does this KB article help?
It's an example of sending emails using the .NET SMTPClient with a outbound SMTP service called outMail which also works as a send connector inside O365.