big trouble getting data from attachment in email

Discussion in 'Python' started by nephish, Feb 25, 2011.

  1. nephish

    nephish Guest

    Hey all,
    We are getting data from radios in the field by way of email. i have been able to extract the atachments and use them, but they changed some things in their message, and now i am kinda stuck.

    here is an example:



    From nobody Fri Feb 25 16:09:41 2011
    Return-Path: <>
    X-Original-To:
    Delivered-To:
    Received: from istbsp01.sbd.iridium.com (outbound.sbd.iridium.com
    [12.47.179.11])
    by mail.texaspivot.com (Postfix) with ESMTP id EF1C3439C3
    for <>; Fri, 25 Feb 2011 15:47:41 -0600 (CST)
    Reply-To: <>
    From:
    To:
    Subject: SBD Msg From Unit: 300234010906500
    MIME-Version: 1.0
    Content-Type: multipart/mixed;boundary="SBD.Boundary.605592468"
    Message-Id: <>
    Date: Fri, 25 Feb 2011 21:45:40 +0000 (GMT)

    SBM Message
    --SBD.Boundary.605592468
    Content-Type: text/plain;charset=US-ASCII
    Content-Disposition: inline
    Content-Transfer-Encoding: 7bit

    MOMSN: 1931
    MTMSN: 0
    Time of Session (UTC): Fri Feb 25 21:45:40 2011
    Session Status: 00 - Transfer OK
    Message Size (bytes): 16

    Unit Location: Lat = 40.121138 Long = -97.672171
    CEPradius = 2


    --SBD.Boundary.605592468
    Content-Type: application/x-zip-compressed; name="SBMmessage.sbd"
    Content-Disposition: attachment; filename="300234010906500_001932.sbd"
    Content-Transfer-Encoding: base64

    this is the part i need to get. the 300234010906500.sbd is the attachment that i need to save.

    i am using the msg.walk() but all the examples i see use a different content-type.

    thanks for any help.
    sk
     
    nephish, Feb 25, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shaguf
    Replies:
    0
    Views:
    382
    Shaguf
    Dec 24, 2008
  2. Shaguf
    Replies:
    0
    Views:
    463
    Shaguf
    Dec 26, 2008
  3. Shaguf
    Replies:
    0
    Views:
    250
    Shaguf
    Dec 26, 2008
  4. Shaguf
    Replies:
    0
    Views:
    227
    Shaguf
    Dec 24, 2008
  5. ecureuil
    Replies:
    0
    Views:
    330
    ecureuil
    May 28, 2006
Loading...

Share This Page