Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Python mail attachments..

Options
  • 10-10-2008 10:38am
    #1
    Closed Accounts Posts: 1,788 ✭✭✭


    Hi
    Anyone know how to READ attachments from emails in python ?

    I can send attachments ok , but reading them is a different matter ...


Comments

  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    You can iterate over the various MIME parts with 'walk()' and deal with each attachment using 'get_filename()' and 'get_payload()'. If you search for 'walk' on this example page you'll find a code sample parsing a multi-part email message.


Advertisement