Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35419
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Python, email temperature |
| Date | 2012-12-23 19:31 -0500 |
| References | <543ec063-14c1-4ca6-a911-ae6f58c22a8c@googlegroups.com> <bf6655e9-4b90-4be7-a5c6-758777ea6c0e@googlegroups.com> <50D73E0C.70709@lightbird.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1229.1356309117.29569.python-list@python.org> (permalink) |
On 12/23/2012 12:23 PM, Mitya Sirenef wrote:
> On 12/23/2012 08:46 AM, KarlE wrote:
>> On Saturday, December 22, 2012 9:36:41 PM UTC+1, KarlE wrote:
>> from __future__ import division
Depending on the linux installed, you should be able to run 3.2 or 3.3
instead of 2.7. Though there are still 2.x only modules, some things
work better in 3.x (including default division).
>> server.sendmail(fromaddr, toaddrs, ord)
>> server.quit()
>>
>> main()
>>
> I'm not sure if Raspberry Pi has it, but usually you want to
> use the email module, as in example on this page:
>
> http://docs.python.org/2/library/email-examples.html#email-examples
3.2+ have a separate .send_message method for email message objects.
> I think what happens is that because your message starts
> with 'Subject:', it's interpreted as subject header instead of
> an email. You can try adding two newlines after Subject:,
> that might help... but using email module is best if possible.
The 3.3 SMTP doc says that the fromaddr and toaddrs are only used by the
transport layer and do not become part of the email message. The doc
example has
msg = ("From: %s\r\nTo: %s\r\n\r\n"
% (fromaddr, ", ".join(toaddrs)))
The body is appended after the double return. A subject line and any
other standard headers would go before.
OT note: the PSF (Python Software Foundation) has bought a Raspberry PI
and another ARM board to test Python on. I am happy to read that it
seems to be working so far.
--
Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python, email temperature Alexander Ranstam <ranstam@gmail.com> - 2012-12-22 12:36 -0800
Re: Python, email temperature KarlE <ranstam@gmail.com> - 2012-12-22 12:38 -0800
Re: Python, email temperature Joel Goldstick <joel.goldstick@gmail.com> - 2012-12-22 15:44 -0500
Re: Python, email temperature KarlE <ranstam@gmail.com> - 2012-12-22 12:54 -0800
Re: Python, email temperature Gary Herron <gary.herron@islandtraining.com> - 2012-12-22 13:12 -0800
Re: Python, email temperature KarlE <ranstam@gmail.com> - 2012-12-22 12:54 -0800
Re: Python, email temperature No One <atsidi@gmail.com> - 2012-12-22 21:53 +0000
Re: Python, email temperature Gary Herron <gary.herron@islandtraining.com> - 2012-12-22 12:45 -0800
Re: Python, email temperature KarlE <ranstam@gmail.com> - 2012-12-22 14:50 -0800
Re: Python, email temperature Chris Angelico <rosuav@gmail.com> - 2012-12-23 10:15 +1100
Re: Python, email temperature KarlE <ranstam@gmail.com> - 2012-12-23 05:46 -0800
Re: Python, email temperature Mitya Sirenef <msirenef@lightbird.net> - 2012-12-23 12:23 -0500
Re: Python, email temperature Dave Angel <d@davea.name> - 2012-12-23 15:34 -0500
Re: Python, email temperature Terry Reedy <tjreedy@udel.edu> - 2012-12-23 19:31 -0500
csiph-web