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
| Method | Best For | Transport | Setup Time | Technical Level |
|---|---|---|---|---|
| Password | Email clients, scripts, general use | SMTP mail.motorical.com:2587 | ~2 min | Beginner |
| API Key | Web apps, automation over HTTPS | POST https://api.motorical.com/v1/send | ~2 min | Developer |
| OAuth 2.0 | Apps that need short-lived SMTP credentials | SMTP with access token as password (or XOAUTH2) | ~10 min | Advanced |
| mTLS | High-security / compliance clients | SMTP + client certificate | ~15 min | Expert |
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) frommust use the Motor Block’s assigned domain- At least one of
textorhtmlis required;tomay be a string or array
Request fields
| Field | Type | Notes |
|---|---|---|
from | string | Required. An address on the Motor Block's assigned domain |
fromName | string | Display name, no line breaks |
to | string or array | Required. One address or a list |
cc, bcc | string or array | Copies. Only on Motor Blocks that deliver through the gateway |
replyTo | string | Reply address |
subject | string | Required |
text, html | string | At least one is required |
headers | object | Custom headers. Platform-managed ones (From, To, Subject, Message-ID, DKIM and similar) are refused |
attachments | array | Only on Motor Blocks that deliver through the gateway |
dryRun | boolean | Validate 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
| Step | URL |
|---|---|
| Authorize | https://motorical.com/api/oauth2/authorize |
| Token | https://motorical.com/api/oauth2/token |
| Validate (optional) | GET https://motorical.com/api/oauth2/validate (Bearer access token) |
Setup (dashboard)
- Open the Motor Block → SMTP Configuration → Configure → choose OAuth 2.0.
- Create OAuth App (registers
client_id, showsclient_secretonce, sets redirect URI — defaulthttps://motorical.com/oauth/callback). - Configure Now so the block’s active method is OAuth 2.0.
- Test OAuth Flow (opens consent → Approve → exchanges code for tokens automatically when opened from Configure).
- Use the access token as the SMTP password until it expires (~1 hour); refresh with
grant_type=refresh_tokenor 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/audchecked 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 expectsAuthorization: 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)
- Open the Motor Block → SMTP Configuration → Configure → choose mTLS.
- Generate certificate. Generating a new one replaces the old one straight away; the old certificate stops working.
- Download certificates and keep the private key safe. The bundle has the P12 (with its own import password), PEM
.crtand.key, the chain, and a DER copy. - Press Done.
Connection
| Server | mail.motorical.com |
| Port | 2587 (STARTTLS) |
| Client certificate | your .crt and .key (or the P12) |
| AUTH | none |
| From address | must 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.