python 3.x - why do i get network is unreachable error in my smtp program? -


import smtplib  fromadd = 'xyz@gmail.com' = 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() 

in program above, got oserror: [errno 101] network unreachable error message on screen when execute it, why happen , how correct it?

in program, tell connect www.gmail.com, domain not email server, , @marcelm noticed. try using gmail.com or mail.google.com.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -