Skip to main content

service_send_connectors

Creates, updates, deletes, gets or lists a service_send_connectors resource.

Overview​

Nameservice_send_connectors
TypeResource
Idovh.email_exchange.service_send_connectors

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerId of this send connector
task_pending_idintegerPending task for this send connector (wire: taskPendingId)
display_namestringName of your send connector (wire: displayName)
creation_datestring (date-time)Creation date (wire: creationDate)
defaultbooleanDefault send connector, which is used to send all e-mails that are not handled by other send connectors that have been custom-created
dns_routingbooleanUse dns MX record to route emails via this send connector (wire: dnsRouting)
last_update_datestring (date-time)Last update date (wire: lastUpdateDate)
max_send_sizeintegerMaximum send size in MB (wire: maxSendSize)
portintegerPort adress that will be used to all e-mails send via this send connector
require_tlsbooleanAll messages sent through this connector will be transmitted using TLS (wire: requireTLS)
smart_hoststringRelay domain address that will be used to all e-mails send via this send connector (wire: smartHost)
smart_host_auth_mechanismstringAuthentication mechanism to use for authentication with a smart host (basicAuth, basicAuthRequireTLS, none) (wire: smartHostAuthMechanism)
statestringSend connector state (creating, deleting, internalMigration, ok, reopening, suspended, suspending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, id, organization_nameGet a send connector. Returns the smart host, port, authentication mechanism, TLS requirement, size limit, DNS routing and state of the send connector.
listselectexchange_service, organization_namex_pagination_modeList send connectors. Returns the IDs of the send connectors of the service, which relay outgoing emails through a smart host.
createinsertexchange_service, organization_name, display_name, smart_hostCreate a send connector. Creates a send connector that relays emails through a smartHost, with an optional port, TLS and authentication, and returns the task.
updateupdateexchange_service, id, organization_nameUpdate a send connector. Updates the name, smart host, port, maximum send size, TLS requirement and DNS routing of the send connector.
deletedeleteexchange_service, id, organization_nameDelete a send connector. Deletes the send connector, so that outgoing emails no longer go through its smart host, and returns the task.
change_authenticationexecexchangeService, id, organizationNameChange send connector authentication. Sets the smart host authentication mechanism, user and password of the send connector, and returns the task.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
exchangeServicestringThe internal name of your exchange service
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
idintegerId of this send connector
organizationNamestringThe internal name of your exchange organization
organization_namestringThe internal name of your exchange organization (wire: organizationName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a send connector. Returns the smart host, port, authentication mechanism, TLS requirement, size limit, DNS routing and state of the send connector.

SELECT
id,
task_pending_id,
display_name,
creation_date,
default,
dns_routing,
last_update_date,
max_send_size,
port,
require_tls,
smart_host,
smart_host_auth_mechanism,
state
FROM ovh.email_exchange.service_send_connectors
WHERE exchange_service = '{{ exchange_service }}' -- required
AND id = '{{ id }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

INSERT examples​

Create a send connector. Creates a send connector that relays emails through a smartHost, with an optional port, TLS and authentication, and returns the task.

INSERT INTO ovh.email_exchange.service_send_connectors (
display_name,
max_send_size,
password,
port,
require_tls,
smart_host,
smart_host_auth_mechanism,
user,
exchange_service,
organization_name
)
SELECT
'{{ display_name }}' /* required */,
{{ max_send_size }},
'{{ password }}',
{{ port }},
{{ require_tls }},
'{{ smart_host }}' /* required */,
'{{ smart_host_auth_mechanism }}',
'{{ user }}',
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

UPDATE examples​

Update a send connector. Updates the name, smart host, port, maximum send size, TLS requirement and DNS routing of the send connector.

UPDATE ovh.email_exchange.service_send_connectors
SET
display_name = '{{ display_name }}',
dns_routing = {{ dns_routing }},
max_send_size = {{ max_send_size }},
port = {{ port }},
require_tls = {{ require_tls }},
smart_host = '{{ smart_host }}'
WHERE
exchange_service = '{{ exchange_service }}' --required
AND id = '{{ id }}' --required
AND organization_name = '{{ organization_name }}' --required;

DELETE examples​

Delete a send connector. Deletes the send connector, so that outgoing emails no longer go through its smart host, and returns the task.

DELETE FROM ovh.email_exchange.service_send_connectors
WHERE exchange_service = '{{ exchange_service }}' --required
AND id = '{{ id }}' --required
AND organization_name = '{{ organization_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change send connector authentication. Sets the smart host authentication mechanism, user and password of the send connector, and returns the task.

EXEC ovh.email_exchange.service_send_connectors.change_authentication
@exchangeService='{{ exchangeService }}' --required,
@id='{{ id }}' --required,
@organizationName='{{ organizationName }}' --required
@@json=
'{
"password": "{{ password }}",
"smartHostAuthMechanism": "{{ smartHostAuthMechanism }}",
"user": "{{ user }}"
}'
;