MailError while sending Email : "Invalid login: 535 5.7.3 Authentication unsuccessful"
Hi Team,
Although I am using correct credential for sending email but still I am getting below error while running this task in Azure DevOps release pipeline. Can you please look into it and let me know if I am missing anything or Is there any other requirement for sending email?
Using Generic connection to set up Setup SMTP Endpoint Server URL : https://outlook.office365.com/EWS/Exchange.asmx ( NOTE : This is not public SMTP server) Agent Pool : Azure Pipeline. Error Message :
_2020-05-01T19:13:50.9606439Z Host: outlook.office365.com
2020-05-01T19:13:50.9606806Z HostName: outlook.office365.com
2020-05-01T19:13:50.9607122Z Port: null
2020-05-01T19:13:50.9607425Z Protocol: smtp:
2020-05-01T19:13:50.9608226Z Using HostName: outlook.office365.com and port: 587
2020-05-01T19:13:56.0715522Z MailError: Error: Invalid login: 535 5.7.3 Authentication unsuccessful [XXXXXX.namprd13.prod.outlook.com]
2020-05-01T19:13:56.0717044Z MailError: Error: Invalid login: 535 5.7.3 Authentication unsuccessful [XXXXXX.namprd13.prod.outlook.com]
2020-05-01T19:13:56.0717722Z MailError: Error: Invalid login: 535 5.7.3 Authentication unsuccessful [XXXXXX.namprd13.prod.outlook.com]
2020-05-01T19:13:56.0719012Z at ReportError (D:\a_tasks\EmailReport_36fd41b1-8024-4ce9-a5a0-53c3e54ed105\1.1.8\exceptions\ReportError.js:6:9)
2020-05-01T19:13:56.0719704Z MailError: Error: Invalid login: 535 5.7.3 Authentication unsuccessful [XXXXXX.namprd13.prod.outlook.com]
2020-05-01T19:13:56.0720908Z at MailError (D:\a_tasks\EmailReport_36fd41b1-8024-4ce9-a5a0-53c3e54ed105\1.1.8\exceptions\MailError.js:6:9)
2020-05-01T19:13:56.0721649Z at ReportError (D:\a_tasks\EmailReport_36fd41b1-8024-4ce9-a5a0-53c3e54ed105\1.1.8\exceptions\ReportError.js:6:9)
2020-05-01T19:13:56.0722902Z at EmailSender.
Hi , Is it possible to run this email Task feature using Office365 SMTP server or is it meant only for Public SMTP server ? Can anyone please clarify?
@PrasadSusant As long as the agent can connect to the email servers, this should work. we have tested this with private servers and shouldn't be any different.
https://stackoverflow.com/questions/36355271/how-to-send-email-with-powershell You can add a INLINE powershell task to your pipeline with above script. Change the params to yours and see if it works. If this powershell script works in your agent, email task should work.
Clealry in your case, authentication is failing - not a connection issue.
can you try unchecking "Enable TLS" checkbox in the task options and see what happens?