Skip to main content

Notifications

Community site session details

Community site session details

Session Id : LvEnh3isRYdK6D9BGLOgYE
Power Apps - Building Power Apps
Answered

Send Email Error: The SMTP server 'smtp.office365.com' requires a secure connection or the client was not authenticated

Like (1) ShareShare
ReportReport
Posted on 5 Jul 2024 18:39:31 by 726

I am getting this error to send emails.

 

 

SMTP.SendEmailV2 failed: { "status": 403, "message": "The SMTP server 'smtp.office365.com' requires a secure connection or the client was not authenticated. Ensure you are using SSL connection and check your account's security settings (if you have enabled 2-step verification, try to use App password, otherwise, turn on access for less secure apps).\r\nclientRequestId: c14eae0b-84f4-43e7-b498-d0a0d56f3035", "source": "smtp.office365.com:25", "errors": [] }

 

 

When I ran a test in a test environment I had no issues, however, in our production environment the issue occurs. Given that there was a recent update that was published only a few days ago the test and production environments has no changes to the application.

 

Also this issue is only occurring for one of the business' applications. We have been receiving email notifications from our other applications. 

Categories:
  • Suggested answer
    rpersad Profile Picture
    726 on 23 Jul 2024 at 14:28:15
    Send Email Error: The SMTP server 'smtp.office365.com' requires a secure connection or the client was not authenticated
    Found out the issue was due to the application using an older SMTP connection. Not sure how this occurred given that I was publishing the development version, which has the correct SMTP connection, into our Production environment.
  • rpersad Profile Picture
    726 on 08 Jul 2024 at 12:30:41
    Re: Send Email Error: The SMTP server 'smtp.office365.com' requires a secure connection or the client was not authenticated

    Good day @FLMike 


    To answer your question, none of the apps are the same, however, the syntax logic that it is using to send email notifications are when using the function SMTP.SendEmailV2(). Also, given recent changes from our development and testing environment were published to our production environment I am unable to determine the reasoning for this issue to only exist in production, when both environments use the same authentication and connection.

     

    And given we have other applications using the same connection in our production environment I can rule out the issue is due to the production environment

     

    Here is the code. the gblFrom variable stores a string email of an authenticated account which is used to send emails for all our business' applications. 

    //Subject Code S1: Email Supervisor on Leave Request
    SMTP.SendEmailV2({
     From: gblFrom,
     To: gblLMAEmployee.Manager.Email,
     Subject: Concatenate("S1: Request for Leave for: ",gblLMAEmployee.emp_name, " [", gblFormStatus,"]"),
     Body: htmlLeaveSubmitSup.HtmlText,
     IsHtml: true
    });
    Set(gblSendSupSubmitMsg,false)

     

  • Michael E. Gernaey Profile Picture
    41,868 Super User 2025 Season 1 on 05 Jul 2024 at 19:38:03
    Re: Send Email Error: The SMTP server 'smtp.office365.com' requires a secure connection or the client was not authenticated

    Hi @rpersad 

     

    Without seeing and understanding your App its hard to help you. I know people say, hey my other 1000 apps are working. The question is, are those Apps, specifically JUST like this one. However this one gets triggered in this app. And the URLS etc are the same, and the code to authenticate, and code to set who is sending etc etc. Is this App, running on an HTTP connection versus an HTTPS connection (if so then the connection to the SMTP server isn't gauranteed to be HTTPS)

     

     

    But.

    1. The connection isn't authenticated, 

    2. Does the user have permission

     etc etc


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 20

#2
BCBuizer Profile Picture

BCBuizer 10 Super User 2025 Season 1

#2
LC-26081402-0 Profile Picture

LC-26081402-0 10

Overall leaderboard
Loading started