IMAP mailbox → Google Drive

How to save IMAP email attachments to Google Drive automatically

Updated:

Your business email lives on your own domain, hosted by cPanel, Namecheap, Zoho, IONOS, Hostinger, Fastmail or similar. Your files live in Google Drive. This guide shows how to connect the two over IMAP so invoices, receipts and contracts are saved and sorted without forwarding rules or Gmail in the middle.

Free plan, no credit card · Help by email

Why Gmail's tools don't solve this for domain email

Most "save attachments to Google Drive" advice assumes your mail is in Gmail: a Drive add-on, a Gmail filter, or an Apps Script that reads your inbox. All of those act only on messages that are inside a Gmail account. If your address is accounts@yourcompany.com and the mailbox is hosted elsewhere, they never see it.

The usual workaround was to pull the other mailbox into Gmail with Gmailify or "Check mail from other accounts" (POP). That door is closing. Google's help center says it is restricting new configurations and that Gmail will fully remove Gmailify and POP fetching in January 2027; the "Check mail from other accounts" option will no longer be available in Gmail on a computer. The full timeline and your options are in Gmailify and POP ending in Gmail: how to keep saving attachments. Google suggests automatic forwarding from your provider, a desktop mail client over IMAP, or the Gmail mobile app instead. Sources: Learn about changes to third-party email account support in Gmail and Gmail will start removing support for the following features.

Forwarding every message to Gmail just to file attachments doubles your mail, breaks if a forward fails, and copies everything to a second provider. The cleaner route is to read the original mailbox directly over IMAP, the standard protocol every host supports, and send the attachments straight to Drive.

A typical case: a restaurant saves supplier invoices from 5 mailboxes, 2 of them IMAP on its own domain and the rest on Gmail and Outlook. Everything ends up in one Google Drive folder tree that the bookkeeper can open, without anyone forwarding emails by hand. See the setup for restaurants.

Official IMAP settings for popular providers

To connect any tool to your mailbox you need three things: the IMAP server name, the port, and a password (sometimes an app password). Every row below was checked against the provider's own help page, linked in the last column. Use your full email address as the username unless your host tells you otherwise.

ProviderIMAP serverPort / securityPasswordOfficial source
cPanel hosting (any host)Your domain, e.g. mail.example.com (or the server hostname if your domain has no valid SSL certificate)993, SSL/TLS (143 without SSL, not recommended)Mailbox passwordcPanel docs: Set Up Mail Client
Namecheap Private Emailmail.privateemail.com993, SSL (or 143, STARTTLS)Mailbox password or an application password; enable the protocol under "Connect third-party apps"Namecheap knowledgebase
Zoho Mailimappro.zoho.com (paid organization accounts on your domain); imap.zoho.com (personal and free org accounts)993, SSLApplication-specific password if two-factor authentication is on; IMAP Access must be enabled in settingsZoho Mail: IMAP access
IONOS Mail Basic / Businessimap.ionos.com993, SSL/TLSThe password of that email addressIONOS Help: server details
Hostinger Emailimap.hostinger.com993, SSLMailbox passwordHostinger support
Fastmailimap.fastmail.com993, SSL/TLS (not STARTTLS)App password required; your normal password won't workFastmail: Server names and ports

Not in the table? GoDaddy, Bluehost, your local ISP and others publish the same three values. Search their help center for "IMAP settings", or open the "Connect devices" / "Mail client setup" screen in your hosting control panel. If it lists only a POP server, your plan may not include IMAP; ask your host before going further.

Regional hosts: some providers run separate data centers (Zoho, for example, has region-specific domains). If the server above refuses the connection, check the settings page inside your own account, which always shows the right host.

Set up IMAP to Google Drive with Inbox2Drive

Inbox2Drive connects to the mailbox itself over IMAP, reads each new message, classifies the attachment with AI (invoice, receipt, contract, payslip and more) and saves it in the right Google Drive folder. No forwarding, no Gmail account in between. OneDrive and Dropbox work as destinations too.

  1. Gather your IMAP details

    Server and port from the table above, plus your password. If your provider uses app passwords (Fastmail always; Zoho with two-factor authentication; Namecheap optionally), create one now and label it "Inbox2Drive" so you can revoke it later.

  2. Create a free account

    Sign up on the free plan at inbox2drive.com. No credit card needed.

  3. Add the IMAP mailbox

    Choose IMAP as the mailbox type and enter your full email address, the IMAP server (for example imap.hostinger.com), port 993 with SSL, and the password or app password. If the connection fails, re-check the server name and whether IMAP is enabled at your provider.

  4. Connect Google Drive and pick the base folder

    Authorize Google Drive and choose where documents should go, for example a shared folder your bookkeeper already uses.

  5. Set your rules

    Decide how files are organized: by document type, date, sender, or a combination. Rules can route documents by type, sender or content, so supplier invoices go to one place and contracts to another.

  6. Add your other mailboxes

    Gmail and Outlook accounts connect the same way and can feed the same Drive folders, so documents from every inbox end up in one structure.

Connect your IMAP mailbox free

Example Google Drive folder structure

Sort by document type first and date second. Your accountant can open "Invoices / 2026 / 03-March" without searching, and year-end means sharing one folder. When several mailboxes feed the same tree, a sender-level folder for your biggest suppliers keeps things readable:

Google Drive/
└── Inbox2Drive/
    ├── Invoices/
    │   └── 2026/
    │       ├── 01-January/
    │       ├── 02-February/
    │       └── 03-March/
    │           ├── Fresh Produce Supplier/
    │           └── Beverage Distributor/
    ├── Receipts/
    │   └── 2026/
    ├── Contracts/
    └── Payslips/
        └── 2026/

Zero-padded month numbers (01, 02...) keep folders in calendar order. If supplier PDFs arrive with meaningless names like doc_4821.pdf, our free invoice PDF renamer bulk-renames them to a pattern like 2026-03-15_Vendor_INV-0042.pdf right in your browser.

The do-it-yourself alternatives, honestly

Google Apps Script

Apps Script is the go-to free answer for Gmail, because its Gmail service can read your inbox and its Drive service can save files. It has no IMAP client, though. It can only read mail that is already in a Gmail or Google Workspace mailbox, so for a mailbox at Namecheap or IONOS you would first have to get the mail into Gmail, which brings you back to forwarding.

Good: free, flexible, if your mail is already in Gmail. Watch out: not usable for IMAP mailboxes on its own; you maintain the code.

Zapier or Make with an IMAP trigger

Both platforms can connect to an IMAP mailbox. Zapier's IMAP app has a New Email trigger for a mailbox you choose; Make's Email app connects to other providers through IMAP and can iterate over attachments. Pair either with a Google Drive "upload file" action and you have a working pipeline.

Good: no code, works with any IMAP host, lots of other apps. Watch out: you build one workflow per mailbox, both bill by tasks or operations so cost follows your email volume, and recognising an invoice versus a contract means adding and maintaining extra steps yourself. Compare in our Zapier alternative for email attachments.

Forwarding to Gmail, then a Gmail-based method

Set your host to forward a copy of everything to a Gmail address, then use any of the methods in how to save email attachments to Google Drive. This is what Google itself suggests after Gmailify and POP go away.

Good: free. Watch out: two copies of every email, a second account to secure, and some companies don't allow forwarding business mail to another provider.

If your invoices mostly arrive in Microsoft 365, read the guide for Outlook attachments to Google Drive.

Security notes for IMAP connections

Which plan fits

Each connected mailbox, IMAP, Gmail or Outlook, counts as one email account. Current plans from the home page:

PlanPriceEmail accountsEmails / documents per month
Free0 €120 / 10
Starter19 €/mo2500 / 200
Business39 €/mo52,000 / 1,000
Pro79 €/mo1010,000 / 5,000

A business with a couple of domain mailboxes plus one Gmail usually needs Business; the restaurant above with 5 mailboxes fits Business too. Start on Free with one IMAP mailbox to confirm the connection and the folder structure before upgrading.

FAQ

Can I just add my domain email to Gmail and use a Gmail add-on?

Not for much longer on the web. Google says new configurations of Gmailify and POP fetching are being restricted and that Gmail will fully remove them in January 2027. Gmail add-ons and filters only act on mail that is inside Gmail, so a mailbox on your own domain needs a tool that connects to it by IMAP.

What IMAP port should I use?

Port 993 with SSL/TLS for every provider listed on this page. Some providers also offer port 143 with STARTTLS, but 993 is the standard encrypted port and the one to try first.

Do I need an app password?

It depends on the provider. Fastmail requires an app password for IMAP. Zoho requires an application-specific password when two-factor authentication is on. Namecheap Private Email supports application passwords. Typical cPanel, IONOS and Hostinger mailboxes use the mailbox password.

Will Inbox2Drive delete or move my emails?

No. It reads messages to find attachments and saves copies of the files to your cloud storage. Your emails stay where they are, and you can disconnect the mailbox at any time from your dashboard.

Can I mix IMAP mailboxes with Gmail and Outlook?

Yes. Inbox2Drive connects Gmail, Outlook and IMAP mailboxes and can save all of them into the same Google Drive folder tree. The number of mailboxes depends on the plan: 1 on Free, 2 on Starter, 5 on Business and 10 on Pro.

Why does my IMAP connection fail?

The usual causes are a wrong server name, IMAP access switched off in the provider's settings (Zoho and Namecheap Private Email require you to enable it), or using the normal password where the provider expects an app password. Check the settings in your provider's official help page and try again.

Get your domain mailbox's attachments into Google Drive

Add your IMAP mailbox, point it at Google Drive and watch invoices and receipts land in the right folders. Stuck on a server setting? Write to us at marketing@inbox2drive.com and we'll reply by email.

Create a free account

No credit card required