[issue8245] email examples don't actually work (SMTP.connect is not called)

2012-01-02 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

This has already been fixed in issue11883 changing the SMTP constructor call.

--
nosy: +sandro.tosi
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - Call connect() before sending an email with smtplib
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8245
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8245] email examples don't actually work (SMTP.connect is not called)

2010-04-02 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee: georg.brandl - asmodai
nosy: +asmodai

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8245
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8245] email examples don't actually work (SMTP.connect is not called)

2010-03-27 Thread Jason R. Coombs

New submission from Jason R. Coombs jar...@jaraco.com:

Documentation for Python 2.6.5 and 3.1.2 both describe using the smtplib as so:

s = smtplib.SMTP()
s.sendmail(me, [you], msg.as_string())
s.quit()

However, this sample usage is incorrect and doesn't work in practice, because 
s.connect() is never called. If the reader copies the example code, he will get 
an error on the call to sendmail:

smtplib.SMTPServerDisconnected: please run connect() first

The documentation should be updated to reflect the requisite s.connect() call 
(or to supply sample host/port parameters in the construction).

It appears that in the 2.3.5 docs, the .connect() call was there. I have not 
yet investigated why it was removed.

--
assignee: georg.brandl
components: Documentation, Library (Lib)
messages: 101833
nosy: georg.brandl, jaraco
severity: normal
status: open
title: email examples don't actually work (SMTP.connect is not called)
versions: Python 2.6, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8245
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8245] email examples don't actually work (SMTP.connect is not called)

2010-03-27 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

It appears in r71882, the change was made in deference to issue4239.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8245
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8245] email examples don't actually work (SMTP.connect is not called)

2010-03-27 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

According to issue4239#msg75355, the connect call is not required, but I 
believe he is mistaken. The connect call is required unless the s object is 
constructed with host/port parameters, in which case the call to connect 
(without any parameters) will result in various output depending on how 
localhost responds to the connection request.

In any case, the original recommendation still stands, that the .connect() call 
should be restored.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8245
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8245] email examples don't actually work (SMTP.connect is not called)

2010-03-27 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

Matt, I hope you don't mind, but I added you as nosy on this issue as it 
relates to a change you suggested.

--
nosy: +matt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8245
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com