Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'parameter': 0.05; 'python': 0.08; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mon,': 0.16; 'wrote:': 0.16; 'example.': 0.18; 'appears': 0.20; 'header:In-Reply-To:1': 0.22; 'pieces': 0.23; 'pm,': 0.24; 'aug': 0.24; 'code': 0.25; "i'm": 0.27; 'function': 0.27; 'message-id:@mail.gmail.com': 0.29; "didn't": 0.31; 'error.': 0.32; 'does': 0.32; 'anyone': 0.32; 'to:addr:python- list': 0.33; 'skip:" 10': 0.36; 'but': 0.37; 'from:': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'manually': 0.39; 'else': 0.39; 'to:addr:python.org': 0.39; "it's": 0.40; 'your': 0.61; 'straight': 0.63; 'point:': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=DX8hz502gcNztwnjyMIqUp2sqyOzD6HuysEjfN+fYBI=; b=uRELocsZh+ocWB0SPrwiWgTT5cadRCl2leYFtT8L4NlSBhHEAaO3kg33dmkWS47qiC u5NyI4Y7rUvq1p5bs2t2RBOWS2F/vHq4bfQLGBkxY7LJwnGzfqpr8D4a1XHnf9q7t0ok LzeVlLN4GLvpFAJKnAoaVTQZfEQM7XQ71BPVc= MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 8 Aug 2011 17:26:18 +0100 Subject: Re: smtp From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312820781 news.xs4all.nl 23916 [2001:888:2000:d::a6]:53393 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11037 On Mon, Aug 8, 2011 at 5:08 PM, Verde Denim 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? 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