Sometime you might see an issue while using own SMTP email is not getting delivered for some user, and if we look into harness manager logs we see that email was triggered successfully.
So first thing we need to verify by checking the SMTP logs to see if there is some restriction/rule that is causing this behaviour and we can also check and confirm if the email reached to smtp server or not by filtering on user email, But in some case we might not have access to smtp logs instantly and can add delay in process.
So we can use below sample python script from delegate to test if the email is getting delivered or not to isolate the issue.
So please save below script with extension .py and update below:
host = “your smtp host”
port =
FROM = <“your email”>
TO =
import smtplib
host = "smtp.sendgrid.net"
port = 465
print("0")
server = smtplib.SMTP(host, port)
print("1")
FROM = "noreply@harness.io"
TO = "testingharness@mailinator.com"
MSG = "Subject: Test email python\n\nBody of your message!"
print("2")
server.sendmail(FROM, TO, MSG)
print("3")
server.quit()
print ("Email Sent")