Skip to main content

responders

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

Overview​

Nameresponders
TypeResource
Idovh.email_domain.responders

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
accountstringName of account
contentstringContent of responder
copybooleanIf false, emails will be dropped. If true and copyTo field is empty, emails will be delivered to your mailbox. If true and copyTo is set with an address, emails will be delivered to this address
copy_tostringAccount where copy emails (wire: copyTo)
fromstring (date-time)Date of start responder
tostring (date-time)Date of end responder

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount, domainGet a responder. Returns the account, content, start and end dates and copy settings of the responder.
listselectdomainaccount, x_pagination_modeList responders. Returns the account names of the responders of the domain. Filter them by account.
createinsertdomain, account, content, copyCreate a responder. Creates an automatic reply for an account with its content and optional start and end dates, and returns the task. With copy false, emails are dropped; with copy true, they go to the mailbox, or to copyTo when set.
updateupdateaccount, domainUpdate a responder. Changes the content of the automatic reply and the dates it is active (from, to) for the email account.
deletedeleteaccount, domainDelete a responder. Removes the automatic reply of the email account and returns the task. Follow it under task/responder/{id}.

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
accountstringName of account
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"}})
domainstringName of your domain name
accountstringResponder name
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 responder. Returns the account, content, start and end dates and copy settings of the responder.

SELECT
account,
content,
copy,
copy_to,
from,
to
FROM ovh.email_domain.responders
WHERE account = '{{ account }}' -- required
AND domain = '{{ domain }}' -- required
;

INSERT examples​

Create a responder. Creates an automatic reply for an account with its content and optional start and end dates, and returns the task. With copy false, emails are dropped; with copy true, they go to the mailbox, or to copyTo when set.

INSERT INTO ovh.email_domain.responders (
account,
content,
copy,
copy_to,
from,
to,
domain
)
SELECT
'{{ account }}' /* required */,
'{{ content }}' /* required */,
{{ copy }} /* required */,
'{{ copy_to }}',
'{{ from }}',
'{{ to }}',
'{{ domain }}'
RETURNING
id,
account,
action,
date,
domain,
type
;

UPDATE examples​

Update a responder. Changes the content of the automatic reply and the dates it is active (from, to) for the email account.

UPDATE ovh.email_domain.responders
SET
content = '{{ content }}',
from = '{{ from }}',
to = '{{ to }}'
WHERE
account = '{{ account }}' --required
AND domain = '{{ domain }}' --required;

DELETE examples​

Delete a responder. Removes the automatic reply of the email account and returns the task. Follow it under task/responder/{id}.

DELETE FROM ovh.email_domain.responders
WHERE account = '{{ account }}' --required
AND domain = '{{ domain }}' --required
;