JDBC Driver for Email

Build 24.0.9060

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for Email consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.email.EmailDriver
  • 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
    
    jdbc:cdata:email:Port=993;Server=outlook.office365.com;Password=password;User=user;Protocol=IMAP;SMTP Port=587;SMTP Server=smtp.office365.com;

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:email:" or "jdbc:cdata:email:" and 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) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060