Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34110
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <airween@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.011 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'exception': 0.03; 'error:': 0.05; 'utf-8': 0.07; 'cc:addr:python-list': 0.10; '46,': 0.16; 'concatenate': 0.16; 'subject:send': 0.16; 'string': 0.17; 'wrote:': 0.17; 'skip:" 30': 0.20; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; '(most': 0.27; 'forgot': 0.27; 'worked': 0.30; 'attach': 0.30; 'fri,': 0.30; 'code': 0.31; 'file': 0.32; 'traceback': 0.33; 'list': 0.35; 'nov': 0.35; 'but': 0.36; "didn't": 0.36; 'subject:with': 0.36; 'subject:: ': 0.38; 'mean': 0.38; 'hello,': 0.39; 'header:Received:5': 0.40; 'content- disposition:inline': 0.60; '30,': 0.62; 'bcc': 0.84; 'received:hu': 0.93 |
| X-Spam-Flag | NO |
| X-Spam-Score | -1.486 |
| X-Spam-Level | |
| X-Spam-Status | No, score=-1.486 tagged_above=-20 required=4 tests=[ALL_TRUSTED=-1, AWL=0.512, BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9] autolearn=no |
| Date | Fri, 30 Nov 2012 22:03:29 +0100 |
| From | Ervin Hegedüs <airween@gmail.com> |
| To | Ed <akegb3@gmail.com> |
| Subject | Re: send email with bcc |
| References | <9fedf732-2a8e-4445-bdce-b88d53f4540c@googlegroups.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| Content-Transfer-Encoding | 8bit |
| In-Reply-To | <9fedf732-2a8e-4445-bdce-b88d53f4540c@googlegroups.com> |
| User-Agent | Mutt/1.5.20 (2009-06-14) |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.394.1354309583.29569.python-list@python.org> (permalink) |
| Lines | 36 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1354309583 news.xs4all.nl 6892 [2001:888:2000:d::a6]:43655 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:34110 |
Show key headers only | View raw
Hello, On Fri, Nov 30, 2012 at 12:25:37PM -0800, Ed wrote: > > # Send the email > smtp.sendmail(sender, [to] + bcc, msg.as_string()) > > The above generates the following error: > Traceback (most recent call last): > File "/opt/batch/ebtest/example4.py", line 46, in <module> > smtp.sendmail(sender, [to] + bcc, msg.as_string()) didn't you forgot to attach the reason of the error, I mean what is the Exception type? > Other iterations of the code have worked without error, but do not send mail to the BCC recipient. you could't concatenate a list and a string at this way. You can do that one of these: l = ['foo'] s = 'bar' l.append(s) or n = l+[s] a. -- I � UTF-8
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
send email with bcc Ed <akegb3@gmail.com> - 2012-11-30 12:25 -0800 Re: send email with bcc Tim Golden <mail@timgolden.me.uk> - 2012-11-30 20:40 +0000 Re: send email with bcc Ervin Hegedüs <airween@gmail.com> - 2012-11-30 22:03 +0100 Re: send email with bcc Ed <akegb3@gmail.com> - 2012-11-30 14:35 -0800 Re: send email with bcc Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-12-01 14:41 -0500
csiph-web