[Tutor] rf1 (fwd)
Tue, 04 Dec 2001 15:09:57 -0500
Sure does look like it from a quick look, gotta grok the isness before I
can dsay more.
This list has got itself set so if one clicks reply, it goes to the
sender- no replyto field! I was clicking reply, and therefore smaling
Danny in th mail box with a large trout, instead of sticking in the
list's mailbox. Shame on me.
But I alsways set up liss with a reply-to field, so clicking reply
assuredly takes the reply to the list. Some think this is good, some
preferr not to use a reply-to field.
Danny Yoo wrote:
> Hi Kirk,
> I'm forwarding your letter to Tutor, so that the others there can give
> their input on this.
> It sounds like you're looking for the 'rfc822' module, which knows how to
> recognize the forms of most mail messages:
> rfc822 builds something a bit more complicated than a simple dictionary.
> By the way, there's a reason why the admins here won't configure Reply-To
> on Tutor... uh... I just can't remember it at the moment. But thank
> goodness for Google. *grin*
> Let's see... ah, there it is! I do remember that Deirdre was adamantly
> against it, and we had a discussion on it way way back in June:
> Sorry I didn't respond to your question about reply-to sooner. But for
> the reasons listed on that thread, we won't be munging up messages with
> the reply-to header here.
> Talk to you later!
> ---------- Forwarded message ----------
> Date: Tue, 04 Dec 2001 01:45:20 -0500
> From: Kirk Bailey <firstname.lastname@example.org>
> To: Danny Yoo <email@example.com>
> Subject: Re: [Tutor] rf1
> Each field in a email has a name at the beginning of it, and that field
> ends with the CRLF charpair.
> Regretfully, every line in the body also ends with a CRLF, and the body
> field does NOT start with a Body: tag. There is simply a blank line
> immediately before it- that is, CRLFCRLF(stuff in the body).
> I submitted a ciouple of samples of letters Icaptured in the server with
> an alias which appends incoming email to an identity to a file, and that
> was included.
> The idea is to come up with something that wil digest an incoming letter
> and be able to pop out data fields on command, such as To, From,
> subject, and the all important BODY- which has no name, it just comes
> after all the existing headers.
> Danny Yoo wrote:
> > On Tue, 4 Dec 2001, Kirk Bailey wrote:
> > > import string
> > >
> > > f = open("letter2.TXT",r')
> > Be careful --- you need to make sure to balance the quotes, or else Python
> > will think that the string is spilling over. Strings that spill over will
> > be flagged as SyntaxErrors in Python, to make sure that you're aware of
> > this.
> > open(), by the way, will open things with "r"ead permission by default, so
> > the following code does the same thing:
> > f = open("letter2.TXT")
> > Less typing, and less prone to mistakes.
> > > in1=f.readlines()
> > > f.close()
> > >
> > > print in1
> > >
> > > Looks like it formed a tupple if I grok this right.
> > Gotta be nitpicky about this. *grin* To clarify, the command:
> > > in1=f.readlines()
> > is giving you back a list of the lines in your file. There's a difference
> > between a tuple and a list. Tuples use round parentheses:
> > (1, 2, 3)
> > and lists use boxy braces:
> > [1, 2, 3]
> > They're visually similar, and pretty much serve the same role as a holder
> > of possibly many values. The big difference between tuples and lists,
> > though, is that lists are like balloons. They're inflatable if we use
> > append() on them.
> > > But I wanted a dictionary! Those are SO much easier to search!
> > True: dictionaries are easy to search. However, we need to tell Python
> > how exactly you want to search them. Can you give a small example on what
> > you expect the dictionary to look like?
> -Kirk D Bailey (C)2001
> Addme! icq #27840081
> Within the sweep of his sword, Each man is an Ubar.
-Kirk D Bailey (C)2001
Addme! icq #27840081
Within the sweep of his sword, Each man is an Ubar.