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.
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)
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
MS.Ragavendar
20
BCBuizer
10
Super User 2025 Season 1
LC-26081402-0
10