I'm trying to send a e-mail using the Invantive Data Hub using the following query (password and username are redacted).
insert into smtp@Mail
( fromEmail
, toEmail
, subject
, body
, smtpHostAddress
, smtpUsername
, smtpPassword
)
VALUES
( "[email protected]"
, "[email protected]"
, "Test"
, "Body"
, "smtp.office365.com"
, "[email protected]"
, "*******"
)
This results in the following error:
Uitroep itgendhb077: Error in Invantive Data Hub.
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [DB6P191CA0024.EURP191.PROD.OUTLOOK.COM]
The username/password is correct (checked that), is there a way to trigger Invantive Data Hub to use a secure connection?
I have used the smtp syntax from this LinkedIn post.
Sending email from Invantive SQL can sometimes be hard. In your case, I would recommend one of the following solutions:
The first one is a system administrator task; the use of secured transport can be enforced by specifying a value for the field
enableSsl
insmtp@mail
.This field
enableSsl
has become available in July 2017 and later releases. The full list of fields is:More Mail Fields
Please note that
insert into smtp@mail
has many more fields available, such as:For instance, to include an attachment use the fields
attachmentContents
,attachmentName
andattachmentMimeType
. A full list of fields you get by querying eithersystemtablecolumns@datadictionary
or pressing F4 in the query tool when the cursor is located on thesmtp@mail
text.Defaults
You don't have to specify all values on your
insert into smtp@mail
. There are a number of options for which you can set defaults from your settings.xml connection string or through theset
statement.The available options can be using a query like
select * from systemdatacontainerattributes@datadictionary
or onsystemproviderattributes
:smtp-minimum-deliver-duration-ms
: Minimum deliver duration in milliseconds for the SMTP send plus inserted sleep when SMTP send finished earlier than the minimum.smtp-send-timeout-ms
: Timeout in milliseconds after which the SMTP send times out.smtp-enable-ssl
: Set whether SSL is enabled for SMTP connections.smtp-password
: The default SMTP password to authenticate with.smtp-user-name
: The default SMTP user name to authenticate with.smtp-host-port-number
: The default SMTP host post number to use.smtp-host-address
: The default SMTP host address to use.mail-priority
: Priority of the mail; negative is bulk, 0 is neutral, positive is urgent.mail-body-html
: Set whether the mail body is HTML.mail-reply-to-name
: The default REPLY TO name.mail-reply-to-email
: The default REPLY TO email address.mail-from-name
: The default FROM name.mail-from-email
: The default FROM email address.pre-request-delay-ms
: Pre-request delay in milliseconds.invantive-use-cache
: Whether to cache the results of a query.invantive-sql-shuffle-fetch-results-data-containers
: Whether to shuffle results fetched from data containers.invantive-sql-forward-filters-to-data-containers
: Whether to forward filters to data containers.