why do i get network is unreachable error in my smtp program?
<pre><code>import smtplib

fromadd = 'xyz@gmail.com'
to = fromadd
data = 'hello'

server = smtplib.SMTP('www.gmail.com')
server.ehlo()
server.starttls()
server.set_debuglevel(1)
server.login(fromadd,'pwd')
server.sendmail(fromadd, to, data)
server.quit()
</code></pre>

<p>in the program above, i always got OSError: [Errno 101] Network is unreachable error message on my screen when i execute it, why does this happen and how to correct it? </p>