Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Python mail attachments..

  • 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,562 ✭✭✭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
Advertisement