smtp

Verde Denim tdldev at gmail.com
Mon Aug 8 18:45:45 CEST 2011


On Mon, Aug 8, 2011 at 12:26 PM, Chris Angelico <rosuav at gmail.com> wrote:

> On Mon, Aug 8, 2011 at 5:08 PM, Verde Denim <tdldev at gmail.com> wrote:
> > and it returns -
> > "TypeError" with no other information...
> > It appears to be generated from the line
> >
> > msg = ("From: %s\r\nTo: %s\r\n\r\n"
> >        % (fromaddr, ", ".join(toaddrs)))
> >
> > But I'm not sure why...
> >
>
> I transcribed pieces manually from your code into Python 2.4.5 and
> didn't get an error. What did you enter at the From: and To: prompts?
>
>
I'm running 2.6.5 on a debian base...
It didn't seem to matter what is input -
I tried using a single recipient as well as multiples (separated by comma).

Output appears as -
# python send_my_msg.py
From: me at me.com
To: you at you.com
Enter Message, end with ^D:
Traceback (most recent call last):
      File "send_my_msg.py", line 12, in <module>
             % (fromaddr, ", ".join(toaddr)))
TypeError


> As a side point: Does anyone else feel that it's potentially confusing
> to have a function whose parameter has the same name as the function
> itself? This is straight from the example.
>
> ChrisA
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110808/6e02fafb/attachment.html>


More information about the Python-list mailing list