Backblaze B2 Cloud Storage is a cost-effective object storage solution designed for developers and businesses to store large volumes of data. While Backblaze B2 excels at providing reliable, scalable storage through its API, it does not offer a native way to receive files via email. This creates a challenge when your partners, vendors, or customers need to send you files through email—one of the most universal file-sharing methods.
Couchdrop Mailboxes solve this problem by providing dedicated email addresses that automatically save attachments directly to your Backblaze B2 storage. When you create a Mailbox in Couchdrop, you receive a unique email address that anyone can send files to. Couchdrop handles the email processing and transfers the attachments directly to your specified Backblaze B2 bucket, eliminating manual downloads and re-uploads.
In this tutorial, you will configure a Couchdrop Mailbox that saves email attachments to a Backblaze B2 bucket. You will connect your B2 storage to Couchdrop, create a Mailbox, and test the complete workflow. When you finish, vendors and partners will be able to send files to a dedicated email address, and those files will automatically appear in your Backblaze B2 storage without any manual intervention.
Prerequisites
To complete this tutorial, you will need:
- A Couchdrop account with appropriate permissions. You can sign up for a free trial at couchdrop.io.
- A Backblaze B2 account with a bucket already created. Follow the Backblaze guide to creating a bucket if you need to set one up.
- Backblaze B2 credentials: You will need the Bucket ID, as well as an Application Key ID and Application Key. These can be created from your Backblaze account under Application Keys > New Application Key.
- An email client to test sending attachments to your Mailbox.
Step 1 — Connecting Backblaze B2 to Couchdrop
Before you can save email attachments to Backblaze B2, you need to connect your B2 bucket to Couchdrop as a storage destination. This creates a folder in Couchdrop that maps directly to your B2 bucket, allowing files to be stored there.
Log in to your Couchdrop account at my.couchdrop.io. Click + Create in the top navigation and select Connect to Storage from the dropdown menu.
In the storage connection list, locate Backblaze B2 and click Continue. Couchdrop will display the configuration form for Backblaze B2.
Enter the following details to identify the Backblaze connection in Couchdrop:
- Name for this integration: Enter a descriptive name for this connection, such as
Backblaze ProductionorBackblaze Test. This name helps you identify the connection when creating users or automations. - Name for new Couchdrop folder: Enter a folder name that will represent this connection in Couchdrop's file system, such as
BackblazeorB2-Storage. This is the folder path SFTP users will see when they connect.
Enter the following credentials from your Backblaze account:
- Backblaze Key ID: Enter your application key ID. This is the identifier for the application key you created in Backblaze.
- Backblaze Master Key: Enter the application key itself (the long string of characters). This authenticates Couchdrop to access your B2 storage.
- Backblaze Bucket ID: Enter the unique identifier for your B2 bucket. You can find this in your Backblaze account under Buckets.
You can optionally specify a subfolder within your B2 bucket as the root directory for this connection in the Choose a folder section. For example, if you want email attachments to be saved in a specific folder like /email-attachments/, enter that path here. If you leave this blank, files will be saved to the root of your bucket.
Click Save and Test to verify that Couchdrop can successfully connect to your Backblaze B2 bucket. Couchdrop will attempt to authenticate and list the bucket contents. If the test succeeds, you'll see a confirmation message.
Click Add Integration to save the connection. Your Backblaze B2 bucket is now available as a storage location in Couchdrop and will appear in folder browsers throughout the platform.
In the next step, you will create a Mailbox that uses this B2 bucket as its file destination.
Step 2 — Creating a Mailbox for Email Attachments
With your Backblaze B2 bucket connected, you can now create a Mailbox that will automatically save incoming email attachments to that storage.
Navigate to Mailboxes in the Couchdrop sidebar navigation. Click + New Mailbox to start the Mailbox creation process.
Couchdrop will prompt you to select a file destination. This is where incoming email attachments will be saved. Click Select a location and choose your Backblaze B2 connection from the folder browser. You can navigate to a specific folder within your B2 bucket if you want attachments saved to a particular location.
For example, if you want all email attachments organized in a folder called /vendor-files/, navigate to your B2 connection and select or create that folder. This ensures attachments don't mix with other files in your bucket. You can also create a new subfolder within the selected folder with the Create folder button.
Click Select "[folder_name]" once you've selected your destination folder.
Provide a name for the Mailbox. This name is for your reference only and helps you identify the Mailbox's purpose. For example, you might name it "Vendor File Submissions" or "Partner Documents."
Optionally, you can configure an expiry time for the Mailbox. This determines how long the Mailbox will remain active before it automatically disables itself. The available options are:
- Never expire: The Mailbox remains active indefinitely
- 1 Hour through 1 Year: The Mailbox expires after the selected time period
For most business use cases, select Never expire unless you're creating a temporary Mailbox for a specific project or event.
Click Continue to create the Mailbox.
Couchdrop generates a unique email address for your Mailbox. This address will look similar to abc123-d933-47a7-9953-2f2ce7d1cf6c@mail.couchdrop.io. Click Copy to copy this email address to your clipboard.
You have now created a Mailbox that will save email attachments to your Backblaze B2 bucket. In the next step, you will test the workflow to confirm files are delivered correctly.
Step 3 — Testing the Email-to-Backblaze Workflow
Now that your Mailbox is configured, you can test it by sending an email with attachments to verify that files are saved to your Backblaze B2 bucket.
Open your email client and compose a new message. In the To field, paste the Mailbox email address you copied in the previous step.
Add a subject line and message body if desired. The subject doesn't affect file delivery, but including it can help you identify test messages. If you Mailbox has Upload email body contents as .'txt' file enabled, the content of the email body will be saved as a separate.'txt' file in addition to saving attached files.
Attach one or more files to the email. For testing purposes, use files that are easy to identify, such as a PDF document or an image.
Send the email to your Couchdrop Mailbox address.
Within a few moments, Couchdrop will process the email and save the attachments to your Backblaze B2 bucket. To verify this, return to your Backblaze account and navigate to your bucket. You should see the attached files in the folder you specified when creating the Mailbox.
Alternatively, you can view the files through Couchdrop. Navigate to your Backblaze B2 connection in the Couchdrop file browser, and browse to the folder where you configured attachments to be saved. The uploaded files will appear here.
If the files don't appear in your B2 bucket, navigate to Mailboxes in Couchdrop and click on your Mailbox. Click the Recent Activity tab to check if any failure notifications were logged. Common issues include incorrect B2 credentials or insufficient permissions on the B2 application key.
Step 4 — Configuring Advanced Mailbox Settings (Optional)
After confirming your Mailbox works correctly, you may want to adjust additional settings to control who can send files and how you're notified of deliveries.
Navigate to Mailboxes in Couchdrop and click on your Mailbox. Click Edit to access the configuration settings.
In the General tab, locate the Mailbox allowed senders field. By default, this field is empty, which means anyone can send files to your Mailbox. To restrict access to specific senders, enter email addresses or patterns in this field.
For example:
- To allow only a specific vendor:
vendor@partner.com - To allow anyone from a company:
*@partner.com - To allow multiple specific addresses:
vendor1@partner.com, vendor2@partner.com
This prevents unauthorized parties from uploading files to your B2 storage.
In the same section, you can enable Upload email body contents as '.txt' file if you want to preserve the email message along with the attachments. When enabled, Couchdrop creates a text file containing the email body and saves it alongside the attachments.
Navigate to the Expiry and Alerting tab to configure notifications. Send email on Success is enabled by default, where Couchdrop sends a confirmation email each time files are successfully delivered to B2. This can be disabled here. You can also enable Send email on Failure to be alerted if delivery fails.
If you want notifications sent to addresses other than your Couchdrop account email, enable Send email to custom recipients and enter the email addresses in the Email address of recipients field. Separate multiple addresses with commas.
Click Save to apply your configuration changes.
The Actions tab allows you to use your Mailbox as a File Action trigger. You can create a new file action directly from the Mailbox configuration by clicking + Create New File Action. This will take you to the visual automation builder with the Mailbox pre-configured as the trigger when a file is uploaded successfully via the Mailbox.
Next Steps
In this tutorial, you configured automated email attachment delivery to Backblaze B2 using Couchdrop Mailboxes. You connected your B2 bucket as a storage destination in Couchdrop, created a dedicated Mailbox with a unique email address, and verified that attachments are automatically saved to your B2 storage.
You can now share the Mailbox email address with vendors, partners, or customers who need to send you files. They can use their normal email client to send attachments, and those files will automatically appear in your Backblaze B2 bucket without any manual processing on your part. This eliminates the need for file upload portals or manual downloads and re-uploads.
To expand this workflow, you might want to:
- Configure file actions to automatically process attachments when they arrive. For example, you could trigger notifications, rename files with timestamps, or move files to different folders based on sender.
- Set up multiple Mailboxes for different purposes or departments, each saving to different B2 folders.
- Create custom email domains and email aliases so your Mailbox addresses use your company domain instead of
mail.couchdrop.ioalong with a user-friendly email address.
For more information on these features, check out our guides on How to automate file transfers between Backblaze B2 and SFTP and Custom Branding and White Label Domains.