SMTP command stuck in cmd prompt

Keywords: python


I have installed Python 2.7 in widows 7. 
I am trying a basic smtp python program to automatically send mail through python script. But when I am running the script through cmd prompt, it is just stuck indefinitely.

*# Python code to illustrate Sending mail
# to multiple users
# from your Gmail account
import smtplib

# list of email_id to send the mail 
li = [""] 

for i in range(len(li)): 
    s = smtplib.SMTP('', 587) 
    s.login("", "mypassword") 
    message = "Message_you_need_`enter code here`to_send"
    s.sendmail("sender_email_id", li[i], message)