aaP_jayeshm is your smtp configured to use ssl? able to telnet port 465? because the script above uses ssl to send.
perhaps you try sending without ssl
import smtplib
user = 'xxx@xxx.com'
password = 'xxx'
server='xxx.xxx.com'
sent_from = user
to = ['xxx@xxx.com']
email_subject = "Email Notification"
body = "Hi, \n\n This is a test mail."
email_text = """\
From: %s
To: %s
Subject: %s
%s
""" % (sent_from, ", ".join(to), email_subject, body)
smtp_server = smtplib.SMTP(server, 587)
smtp_server.ehlo()
smtp_server.starttls()
smtp_server.ehlo()
smtp_server.login(user, password)
smtp_server.sendmail(sent_from, to, email_text)
smtp_server.close()
Regards,
Wong