JDBC Driver for Email

Build 26.0.9655

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application, based on CData JDBC Driver for Email.

Follow these steps:

  1. Add the driver JAR file to the classpath. The JAR file is located in the installation directory's lib subfolder. Ensure that the .lic file is located in the same folder as the JAR file.
  2. Provide the driver class. For example:
    cdata.jdbc.email.EmailDriver
  3. Provide the JDBC URL. For example:
    jdbc:email:Port=993;Server=outlook.office365.com;Password=password;User=user;Protocol=IMAP;SMTP Port=587;SMTP Server=smtp.office365.com;

    Or, if there is a conflict in your application between drivers using the same URL format, use this form to ensure that you are using the CData driver:

    jdbc:cdata:email:Port=993;Server=outlook.office365.com;Password=password;User=user;Protocol=IMAP;SMTP Port=587;SMTP Server=smtp.office365.com;

    Ensure that the URL starts with either jdbc:email: or jdbc:cdata:email:. The URL can include any of the connection properties in name-value pairs separated with semicolons.

The User and Password properties in the Authentication section must be set to valid credentials. The Server must be specified to retrieve emails and the SMTPServer must be specified to send emails.

Deprecation notice for Gmail users

From May 30, 2022, Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. There are alternatives that allow your continued use of our Email drivers to connect to your Google account, which is why Gmail-specific columns, pseudo-columns, and stored procedures are only getting deprecated. We recommend you move to our Gmail drivers that offer more secure methods of authentication.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9655