Skip to main content

account_diagnostics

Creates, updates, deletes, gets or lists an account_diagnostics resource.

Overview​

Nameaccount_diagnostics
TypeResource
Idovh.email_pro.account_diagnostics

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
can_receive_emailbooleanDetermines if ingoing message has been received (wire: canReceiveEmail)
can_send_emailbooleanDetermines if outgoing message has been delivered (wire: canSendEmail)
connective_webmailbooleanDetermines if possible to authenticate with credentials (wire: connectiveWebmail)
is_lockedbooleanDetermines if account is locked (wire: isLocked)
is_mx_validbooleanDetermines if MX record for account's domain is properly set (wire: isMxValid)
is_spammerbooleanDetermines if account is flagged as spammer (wire: isSpammer)
is_srv_validbooleanDetermines if SRV (autodiscovery) record for account's domain is properly set (wire: isSrvValid)
is_suspendedbooleanDetermines if account is suspended (wire: isSuspended)
last_checkstring (date-time)Last performed diagnostics date (wire: lastCheck)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectemail, serviceReturns the results of the last diagnosis of the email account: account locked, suspended or flagged as spammer, login with its credentials, MX and SRV records, and sending and receiving of emails. (Alpha version)
createinsertemail, service, passwordRun an account diagnosis. Starts a diagnosis of the email account, which requires the account password, 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"}})
emailstringDefault email for this mailbox
servicestringThe internal name of your pro organization

SELECT examples​

Returns the results of the last diagnosis of the email account: account locked, suspended or flagged as spammer, login with its credentials, MX and SRV records, and sending and receiving of emails. (Alpha version)

SELECT
can_receive_email,
can_send_email,
connective_webmail,
is_locked,
is_mx_valid,
is_spammer,
is_srv_valid,
is_suspended,
last_check
FROM ovh.email_pro.account_diagnostics
WHERE email = '{{ email }}' -- required
AND service = '{{ service }}' -- required
;

INSERT examples​

Run an account diagnosis. Starts a diagnosis of the email account, which requires the account password, and returns the task.

INSERT INTO ovh.email_pro.account_diagnostics (
password,
email,
service
)
SELECT
'{{ password }}' /* required */,
'{{ email }}',
'{{ service }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;