If you are going to run the LP_M2_HTTP_REQUEST procedure within your database to execute any mail2 API requests from SQL Server, you must first do the following:


Add a t_default called: m2apikey to T_DEFAULTS for your parent table used by mail2. 

The value is an API key you generate in your mail2 dashboard by going to Settings->APIKeys. This is the key you'll use to access the API from the database.


Run the script in the attached file.

This enables all of the SQL features that this functionality leverages, if you don't already have them enabled. These are the OLE procedures in the Primary Database.

Once complete, you can successfully execute API requests to mail2.


Still need help? Contact Us Contact Us