Skip to main content
About this page · Updated 2026-11-29 22:05 UTC

What this page is: SMTP AUTH alternatives for Motorical — password, API key (HTTPS transactional send), OAuth 2.0, and mTLS.

How far to trust this page: the build checked 3 names, paths, tools, scopes and error codes against the real product (0 do not match). Reviewed claim by claim on 2026-10-22 (documentation truth audit).

Updated 2026-11-29 22:05 UTCLatest change: Send Email pages: every field, shown the same wayRecently updated pages

SMTP Authentication Methods

Motorical supports multiple SMTP AUTH (and HTTPS send) alternatives to match your security requirements. Each Motor Block uses one active method at a time (set under SMTP Configuration → Configure).

Method Comparison​

MethodBest ForTransportSetup TimeTechnical Level
PasswordEmail clients, scripts, general useSMTP mail.motorical.com:2587~2 minBeginner
API KeyWeb apps, automation over HTTPSPOST https://api.motorical.com/v1/send~2 minDeveloper
OAuth 2.0Apps that need short-lived SMTP credentialsSMTP with access token as password (or XOAUTH2)~10 minAdvanced
mTLSHigh-security / compliance clientsSMTP + client certificate~15 minExpert

Password (Basic Auth)​

Use your Motor Block SMTP username and a generated password.

SMTP Server: mail.motorical.com
Port: 2587 (STARTTLS) or 2465 (implicit TLS)
Username: [motor-block smtp username]
Password: [generated password — shown once]

Passwords are not re-displayed after creation. Generate a new one from Configure if lost.

API Key (HTTPS Send API)​

Motor-block API keys authenticate POST https://api.motorical.com/v1/send, not SMTP password auth.

curl -X POST https://api.motorical.com/v1/send \
-H "Authorization: ApiKey mk_live_YOUR_PREFIX_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"from": "sender@yourdomain.com",
"fromName": "Acme Billing",
"to": ["recipient@example.com"],
"subject": "Test Email",
"text": "Hello from Motorical!",
"html": "<p>Hello from <strong>Motorical</strong>!</p>",
"dryRun": true
}'
  • Header may also be X-Api-Key: mk_live_…
  • Key format: mk_live_<prefix>_<secret> (full token shown once)
  • from must use the Motor Block’s assigned domain
  • At least one of text or html is required; to may be a string or array

Request fields​

FieldTypeNotes
fromstringRequired. An address on the Motor Block's assigned domain
fromNamestringDisplay name, no line breaks
tostring or arrayRequired. One address or a list
cc, bccstring or arrayCopies. Only on Motor Blocks that deliver through the gateway
replyTostringReply address
subjectstringRequired
text, htmlstringAt least one is required
headersobjectCustom headers. Platform-managed ones (From, To, Subject, Message-ID, DKIM and similar) are refused
attachmentsarrayOnly on Motor Blocks that deliver through the gateway
dryRunbooleanValidate and return the result without sending

The Send API reference lists every field, limit and error.

OAuth 2.0​

Motorical acts as the OAuth 2.0 authorization server for the Motor Block. You do not need Google, Okta, or another IdP. Your app (or a browser + curl) completes the authorization-code flow; the resulting access token is used as the SMTP password (PLAIN/LOGIN) or via XOAUTH2.

Endpoints​

StepURL
Authorizehttps://motorical.com/api/oauth2/authorize
Tokenhttps://motorical.com/api/oauth2/token
Validate (optional)GET https://motorical.com/api/oauth2/validate (Bearer access token)

Setup (dashboard)​

  1. Open the Motor Block → SMTP Configuration → Configure → choose OAuth 2.0.
  2. Create OAuth App (registers client_id, shows client_secret once, sets redirect URI — default https://motorical.com/oauth/callback).
  3. Configure Now so the block’s active method is OAuth 2.0.
  4. Test OAuth Flow (opens consent → Approve → exchanges code for tokens automatically when opened from Configure).
  5. Use the access token as the SMTP password until it expires (~1 hour); refresh with grant_type=refresh_token or re-run Test OAuth Flow.

redirect_uri must match the registered value exactly.

Token exchange (manual)​

curl -sS -X POST 'https://motorical.com/api/oauth2/token' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "authorization_code",
"code": "PASTE_CODE_HERE",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"redirect_uri": "https://motorical.com/oauth/callback"
}'

Response includes access_token, refresh_token, expires_in, and motor_block.smtp_username.

SMTP send with access token​

swaks --server mail.motorical.com --port 2587 --tls \
--auth LOGIN \
--auth-user 'YOUR_SMTP_USERNAME' \
--auth-password 'YOUR_ACCESS_TOKEN' \
--from 'noreply@yourdomain.com' \
--to 'recipient@example.com' \
--header 'Subject: OAuth2 SMTP test' \
--body 'Access token used as SMTP password'

Gateway also advertises XOAUTH2. Host: mail.motorical.com, ports 2587 (STARTTLS) or 2465 (implicit TLS).

Notes​

  • Access tokens are JWTs issued for Motorical SMTP (iss / aud checked on the gateway).
  • Client secret is shown once at create/regenerate — store it securely.
  • Do not send OAuth access tokens to POST /v1/send; that endpoint expects Authorization: ApiKey mk_live_….

Mutual TLS (mTLS)​

The client certificate is the credential. There is no SMTP username or password, and you send without AUTH. The gateway recognises the certificate by its fingerprint and maps it to your Motor Block.

Setup (dashboard)​

  1. Open the Motor Block → SMTP Configuration → Configure → choose mTLS.
  2. Generate certificate. Generating a new one replaces the old one straight away; the old certificate stops working.
  3. Download certificates and keep the private key safe. The bundle has the P12 (with its own import password), PEM .crt and .key, the chain, and a DER copy.
  4. Press Done.

Connection​

Servermail.motorical.com
Port2587 (STARTTLS)
Client certificateyour .crt and .key (or the P12)
AUTHnone
From addressmust be on the Motor Block's assigned domain, exactly: the main domain or a subdomain, not both

A certificate that is expired, replaced, or not the Motor Block's current one is refused with 550 Authentication required.

1. Check the certificate is recognised (sends nothing)​

swaks --server mail.motorical.com --port 2587 --tls \
--tls-cert ./client.crt --tls-key ./client.key \
--from 'noreply@yourdomain.com' \
--to 'recipient@example.com' \
--quit-after RCPT

250 Accepted after both MAIL FROM and RCPT TO means the certificate was recognised. 550 Authentication required means it was not presented or is not the active one. Use the bundle's .crt and .key files, renamed or with the paths adjusted.

2. Send a test message​

swaks --server mail.motorical.com --port 2587 --tls \
--tls-cert ./client.crt --tls-key ./client.key \
--from 'noreply@yourdomain.com' \
--to 'you@example.com' \
--header 'Subject: mTLS test' \
--body 'mTLS test from Motorical'

In code​

// Node.js (nodemailer): no auth block
const transporter = nodemailer.createTransport({
host: 'mail.motorical.com',
port: 2587,
secure: false,
requireTLS: true,
tls: { cert: fs.readFileSync('client.crt'), key: fs.readFileSync('client.key') },
});
# Python (smtplib): starttls with the certificate, no login()
import smtplib, ssl
context = ssl.create_default_context()
context.load_cert_chain('client.crt', 'client.key')
with smtplib.SMTP('mail.motorical.com', 2587) as server:
server.starttls(context=context)
server.sendmail('noreply@yourdomain.com', ['you@example.com'], message)

Connectivity only​

openssl s_client -connect mail.motorical.com:2587 -starttls smtp -cert ./client.crt -key ./client.key shows that the server is reachable and the TLS handshake works. It does not prove the certificate was accepted; use the check in step 1 for that.