Anlagen aus mehreren mails speichern

You want to save multiple emails with attachments as a single file. Here are a few ways to do that:

Method 1: Using Microsoft Outlook

  1. Open Microsoft Outlook and select the emails you want to save as a single file.
  2. Right-click on the selected emails and choose "Save As" from the context menu.
  3. In the "Save As" dialog box, select a location to save the file and choose a file format (e.g.,.msg or.eml).
  4. Click "Save" to save the emails as a single file.

Method 2: Using a third-party email client or add-on

There are several third-party email clients and add-ons that allow you to save multiple emails as a single file. For example:

Method 3: Using a script or programming language

You can also use a script or programming language to save multiple emails as a single file. For example:

Here is an example of how you might use Python to save multiple emails as a single file:

import imaplib
import email
import os

# Set up your email account credentials
username = 'your_email_address'
password = 'your_email_password'

# Connect to your email account
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login(username, password)
mail.select('inbox')

# Search for the emails you want to save
search_criteria = '(FROM "[email protected]" SUBJECT "example")'
status, messages = mail.search(None, search_criteria)

# Save the emails as a single file
with open('emails.txt', 'wb') as f:
    for num in messages[0].split():
        status, msg = mail.fetch(num, '(RFC822)')
        raw_message = msg[0][1]
        message = email.message_from_bytes(raw_message)
        for part in message.walk():
            if part.get_content_maintype() == 'attachment':
                f.write(part.get_payload(decode=True))

# Close the email account connection
mail.close()
mail.logout()

This script connects to your email account, searches for the emails you want to save, and saves them as a single file. You'll need to modify the script to suit your specific needs and email account credentials.