tags:

views:

66

answers:

1
+1  A: 

It's likely that your school's SMTP server does not permit outside access to port 587. Gmail does, and requires authentication to ensure that you are who you say you are (and so that spammers can't send email appearing to be from you unless they know your password). Your school may have chosen to set up their mail server so that only connections from within the school can send mail in this way.

Greg Hewgill
Thank you. I tried with port 465, and now I don't even get an error, it just stays until I ctrl+c for a keyboard interrupt. I can't fit the resulting error message because it won't fit in this comment. Is it appropriate to start another question with this new information?
jakecar
@jakecar: What prompted you to try port 465? That's SMTP over SSL, and unless you *know* that your school supports that protocol, they probably don't.
Greg Hewgill
You're correct, I just realized that my school uses SSL :X...I'm gonna go ahead and guess that I need to add some special code to deal with the SSL?
jakecar
@jakecar: Yes, you will. You might be best off at this point opening a new question such as "How can I connect to a mail server using SMTP over SSL using Python?"
Greg Hewgill