I think you want to use port 587 if you are using TLS. We are using port 587 successfully with gmail. In any case, Django 1.3.1 does this, not the code you showed.
self.connection = smtplib.SMTP(self.host, self.port, local_hostname=DNS_NAME.get_fqdn()) if self.use_tls: self.connection.ehlo() self.connection.starttls() self.connection.ehlo() So this method will probably not work over port 465. On Mar 14, 2:57 am, infinitylX <infinit...@gmail.com> wrote: > Guys when i try to use smtplib directly with next code every things works. > > #!/usr/bin/env python > import smtplib > > def main(): > print "sending throut gmail" > username = "infinit...@gmail.com" > password = "password" > fromaddr = "infinit...@gmail.com" > toaddr = "s...@other.email.com" > msg = "join the quark" > > server = smtplib.SMTP_SSL('smtp.googlemail.com:465') > server.login(username, password) > server.sendmail(fromaddr, [toaddr], msg) > server.quit() > print "sended" > > if __name__ == '__main__': > main() > > Середа, 14 березня 2012 р., 00:09:36 UTC+2 користувач infinitylX написав: > > > > > > > > > > > I have same problem. > > > Telnet works, if i turn off tls and set 25 as port and every thing > > works fine. But i want secure connection with tls... > > By the way i have same situation with other smtp server (yandex for > > example.) > > > Here is my settings: > > EMAIL_USE_TLS = True > > EMAIL_HOST = "smtp.googlemail.com" > > EMAIL_PORT = 465 > > EMAIL_HOST_USER = "infinit...@gmail.com" > > EMAIL_HOST_PASSWORD = "password" > > > On Mar 6, 11:52 pm, CLIFFORD ILKAY <clifford_il...@dinamis.com> wrote: > > > On 03/06/2012 04:05 PM, Scott Macri wrote: > > > > > I can run thunderbird on the same machine and don't have any issues. > > > > No, I am not running tbird at the same time as the django app. Thus, > > > > I know it's not a port conflict. > > > > It wouldn't make any difference if you were running your Django app and > > > T'bird at the same time. The port that the Django dev server uses has > > > nothing to do with the port the Gmail SMTP server uses. Even if your > > > Django app were to send email at precisely the same time as T'bird, it > > > wouldn't make any difference. SMTP servers are designed to handle > > > multiple simultaneous connections. > > > -- > > > Regards, > > > > Clifford Ilkay > > > Dinamis > > > 1419-3266 Yonge St. > > > Toronto, ON > > > Canada M4N 3P6 > > > > <http://dinamis.com> > > > +1 416-410-3326 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.