You are currently viewing Paperless document delivery via email

Paperless document delivery via email

Paperless document delivery via email! To send documents directly from the web interface via email, activate the function 👍

How to Send Documents via Email from Paperless-ngx Using a Google App PasswordPaperless-ngx is a powerful document management system that allows you to organize your documents digitally. One of its handy features is the ability to send documents directly via email from the web interface. In this blog post, I’ll guide you step-by-step on how to configure email sending, specifically using a Google account with an App Password, which is required for accounts with Two-Factor Authentication (2FA) enabled.

Prerequisites

  • A running Paperless-ngx installation (preferably with Docker).
  • A Google account with Two-Factor Authentication (2FA) enabled.
  • Access to the configuration files (docker-compose.yml or .env) of your Paperless-ngx installation.
  • Basic knowledge of managing Docker containers.

Video: Paperless document delivery via email

Language: 🇩🇪
☝️ Use YouTube subtitles for all languages.

Step 1: Create a Google App Password

Since Google accounts with 2FA don’t allow regular passwords for SMTP connections, you’ll need an App Password. Here’s how to create one:

  1. Sign in to your Google Account:
    • Go to https://myaccount.google.com and navigate to Security > Two-Step Verification.
    • If 2FA isn’t enabled yet, set it up (e.g., using SMS or an authenticator app).
  2. Generate an App Password:
    • Under Security > Two-Step Verification, scroll to App Passwords and click Generate App Password.
    • Select Other (Custom Name) and enter, for example, “Paperless-ngx”.
    • Click Generate. Google will create a 16-character password (e.g., xxxx xxxx xxxx xxxx).
    • Important: Copy the password and store it securely (e.g., in a password manager). It’s only shown once!

Step 2: Configure Paperless-ngx for Email Sending

To connect Paperless-ngx to Gmail’s SMTP server, you need to update the configuration file.

  1. Edit the Configuration File:
    • Open the docker-compose.yml or .env file of your Paperless-ngx installation.
    • Add the following environment variables:
    • PAPERLESS_EMAIL_HOST: smtp.gmail.com
      PAPERLESS_EMAIL_PORT: 587
      PAPERLESS_EMAIL_HOST_USER: [email protected]
      PAPERLESS_EMAIL_HOST_PASSWORD: your_app_password
      PAPERLESS_EMAIL_FROM: [email protected]
      PAPERLESS_EMAIL_USE_TLS: true
      PAPERLESS_EMAIL_USE_SSL: false
      PAPERLESS_OCR_MODE: force
      • Replace [email protected] with your Gmail address.
      • Replace your_app_password with the 16-character App Password generated earlier (enter without spaces).
  2. Restart Paperless-ngx:
    • Save the changes and restart the Docker container:
    • sudo docker-compose down
    • sudo docker-compose up -d

Step 3: Send Documents via Email

Once configured, you can send documents directly from the web interface:

  1. Log in to the Paperless-ngx web interface.
  2. Open the desired document in the detail view.
  3. Click the Send button (available since Paperless-ngx version 2.15).
  4. In the form, enter:
    • The recipient’s email address.
    • A subject and optional message text.
    • Choose between the Original Version or the Archive Version (with OCR) of the document.
  5. Confirm the send action. The document will be sent as an attachment via Gmail’s SMTP server.

Troubleshooting

If the email sending fails, check the following:

  • Authentication Error: Ensure the App Password is entered correctly (no spaces or typos).
  • Connection Issues: Verify that port 587 (TLS) is not blocked by your network or firewall.
  • Email in Spam: Check the recipient’s spam folder.
  • Check Logs: Use docker logs <container_name> to view error messages.

Additional Notes

  • Sending Multiple Documents: Currently, Paperless-ngx doesn’t natively support sending multiple documents at once. As a workaround, you can download documents individually and send them manually via email.
  • Archive version when sending emails in Paperless-ngx is the OCR-processed, searchable PDF version of the document, which is optimised and text-based. Without this option, the unmodified original version (e.g. JPG or unoptimised PDF) is sent. Select the archive version for searchable documents and the original version for unmodified files.
  • Revoking an App Password: If you need to reset the password, go to Security > 2-factor authentication > App Passwords in your Google Account, remove the Paperless-ngx password, and generate a new one.
  • Further Details: The official Paperless-ngx documentation (https://docs.paperless-ngx.com/configuration/#email-sending) provides additional information on SMTP configuration.

Conclusion

With this guide, you can configure Paperless-ngx to send documents via email directly from the web interface—securely and reliably using a Google App Password. This feature saves time and enhances your document management workflow.

Have questions or run into issues? Let me know in the comments!

Link to support / donation for the channel
PayPal Link
Bank transfer, Bitcoin and Lightning

#Paperless-NGX #DocumentManagement #Paperless #Digitalization #OfficeManagement #Productivity #EmailSending #GoogleAppPassword #SMTPConfiguration #OpenSource #DocumentOrganization #OfficeTech #ITTips #Docker

Leave a Reply