r/PowerShell • u/YourDadSolanki01 • Feb 25 '26
Infra health check script not sending mail
We are running our health checks with scripts. This script will generate html report and send mail attaching the html as attachment and also content in mail body to our group id but from last 2 days it is not sending mail . HTML file is getting generated successfully. We append html file on every run. Tested smtp with powershell smtp command it works fine by giving credentials but mail sending not working through this health check script. We have added TLS1.2 thinking it might be the issue. But same result. There is no change at SMTP end( same script working fine 2 days back). It was running under scheduled task, we tried to run it directly from Powershell thinking any issue with task or account.
Any idea what to check in this?
View all comments
Show parent comment
1
u/YourDadSolanki01 Feb 25 '26
send mail command is sending mail without any issue but not with script. No error logs on server side. Server not receiving anything for that script mail.