Skip to content
Orvanov0.2.0

smtp_host_not_allowed

HTTP status: 400 · Code: smtp_host_not_allowed

A project’s SMTP host is, or resolves to, an address outside the public internet.

A project’s SMTP host is, or resolves to, a private, loopback, or other non public address. Projects can only send through servers on the public internet, so a project can’t reach your internal network.

Use a public SMTP host from your email provider. To send through a server on a private network, set it as the install SMTP (in the console’s install email settings) instead of a project’s. See Email delivery.

Every SDK throws one error type for a failed call. Match on its code, which is always smtp_host_not_allowed for this error, never on the message.

import { ErrorCode, OrvanoError } from '@orvano/js'
try {
// your Orvano call
} catch (error) {
if (error instanceof OrvanoError && error.code === ErrorCode.smtpHostNotAllowed) {
// handle smtp_host_not_allowed
} else {
throw error
}
}

The error also carries the HTTP status (400), a message, and a request ID. Quote the request ID when you report a problem: the server logs it with the failure. See Errors for how errors work in every SDK, or every error code.