email module Bug in 2.2

Sheila King usenet at thinkspot.net
Fri Feb 8 21:41:14 EST 2002


OK, here is a bug in the mail module. It has to be????

I took an email that I received (a spam) and saved it to a text 
file (which I called 'dtv.txt') and then imported it into an email class
object in an interactive session. 

I've pasted below an interactive session, and below that I've pasted the text 
file that was used in the session. There seem to be some inconsistencies?

-- 
Sheila King
http://www.thinkspot.net/sheila/

"When introducing your puppy to an adult cat,
restrain the puppy, not the cat." -- Gwen Bailey,
_The Perfect Puppy: How to Raise a Well-behaved Dog_



E:\Web\Thinkspotwebsite\dev>python
Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import email
>>> msg = email.message_from_file(open('dtv.txt'))
>>> msg.get_type()
'multipart/related'
>>> msg.get_main_type()
'multipart'
>>> msg.is_multipart()
0
>>>


Here is the text file dtv.txt:

>From DirecTV4Free!!!!@yahoo.com Fri Feb 08 04:45:43 2002
Return-Path: <DirecTV4Free!!!!@yahoo.com>
Delivered-To: xthinkspot-usenet at thinkspot.net
Received: (qmail 3201 invoked from network); 8 Feb 2002 09:45:03 -0000
Received: from unknown (HELO mx.futurequest.net) (130.91.184.200)
  by pt01.futurequest.net (63.151.147.170) with SMTP; 08 Feb 2002 09:45:03 -0000
From: "DirecTV 4 Free" <DirecTV4Free!!!!@yahoo.com>
Date: Fri, 08 Feb 2002 04:45:43
To: usenet at thinkspot.net
Subject: DirecTV 4 Free!!!!
MIME-Version: 1.0
Content-Type: multipart/related;
  boundary="----=_NextPart_MIMSCHNGDM"
Content-Transfer-Encoding: 7bit
Message-ID: PM20004:45:43 AM

This is an HTML email message.  If you see this, your mail client does not support HTML messages.

------=_NextPart_MIMSCHNGDM
Content-Type: text/html;charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<title>Do you have a DirecTV system</title>
<style>
<!--
DIV.Section1 {
    page: Section1
}
SPAN.GramE {
    
}
H2 {
    FONT-WEIGHT: normal; FONT-SIZE: 12pt; FONT-FAMILY: "Times New Roman"; margin-left:0cm;
margin-right:0cm; margin-top:0cm; margin-bottom:0pt
}
-->
</style>
</head>

<body>

<p>     Do you have a DirecTV system? Are you tired of 
paying outrageous prices for what you have? Want more? Are you tired of sending 
your card out to other people and waiting days, possibly paying fees, every time 
DirecTV hits your card? Now you can re-set your own DIRECT TV Access Card 
yourself. You can get all the DIRECT TV channels for free. That's over 300 
channels, including all NFL, NHL, NBA, & Sports, HBO, Pay-per-View, Movies & 
Events, XXX and Local Channels. You can do this by using our simple access card 
activating device. It comes complete with the software you need, and simple 
detailed instructions as well as full support. All you need is a home computer.</p>
<p>Not want to mess around with your card? We provide a service where you can 
send your card to us and we load a PRIVATE Script on your card. The script we 
have does not suffer the shutdowns from DirecTV like others may. The last time 
our script was hit was in Oct. 2001, but if it does happen, we will fix it free 
of charge. Not want to send your card? No problem, we can provide you with a 
brand new card loaded with our software, you just put it in your receiver and 
enjoy the shows.</p>
<p>Not have DirecTV? Paying outrageous amounts for your cable that you only get 
a few channels on? Maybe not have cable available in your area or the "other" 
satellite company isn't providing what you expect? We also have all of the 
satellite equipment available in complete packages. DirecTV with TiVO, Ultimate 
TV, etc. are also available.</p>
<p>Live in an area where high speed broadband internet access is not available? 
We have cutting edge technology that can give you broadband internet access 
while watching your FREE DirecTV programming.</p>
<h2>           
                                                     
</h2>
<h2> </h2>
<h2>                                                                                           
Want More Information????</h2>
<p>                                                                                                           
Then </p>
<blockquote>
  <blockquote>
    <p class="MsoNormal"><span style="font-size: 12pt">

                                                             
                  </span><span
style="font-size: 18pt">
    <a style="color: blue; text-decoration: underline; text-underline: single"
href="mailto:freesat12000 at yahoo.com?subject=I Would Like More Information">
    CLICK HERE</a>.  </span></p>
  </blockquote>
</blockquote>
<p class="MsoNormal"><span style="font-size: 12pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 12pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 12pt"> </span></p>
<h2>  
<a href="mailto:freesatdelete at yahoo.com?subject=Remove From Your Mailing List Please">
Remove Me  From Your Mailing List Please</a></h2>

</body>

</html>
------=_NextPart_MIMSCHNGDM--







More information about the Python-list mailing list