Skip to main content

Testing Your SMTP Integration

Verify your SMTP configuration is working correctly before going to production.

Quick Connection Test

Test basic SMTP connectivity:

telnet mail.motorical.com 2587

Expected response: 220 mail.motorical.com ESMTP Postfix

TLS Connection Test

Verify TLS/STARTTLS is working:

openssl s_client -connect mail.motorical.com:587 -starttls smtp -crlf

Check TLS certificate details:

echo | openssl s_client -connect mail.motorical.com:587 \
-starttls smtp 2>/dev/null | openssl x509 -noout -dates -subject

Send a Test Email with swaks

swaks is the go-to tool for SMTP testing:

# Install: apt-get install swaks (Ubuntu) or brew install swaks (macOS)

swaks \
--server mail.motorical.com \
--port 2587 \
--auth-user "your_motor_block_username" \
--auth-password "your_motor_block_password" \
--tls-optional \
--header "Subject: SMTP Integration Test" \
--body "If you receive this, your SMTP integration is working!"

Test Checklist

TestWhat to Verify
✅ Basic ConnectivityServer responds on mail.motorical.com:2587
✅ AuthenticationMotor block credentials are accepted
✅ TLS/STARTTLSSecure connection is established (TLS 1.2+)
✅ Email DeliveryTest email reaches destination inbox
✅ DNS RecordsSPF, DKIM, DMARC are correctly configured

Verify via the API

After sending a test email, confirm delivery via the Motorical API:

curl -H "Authorization: Bearer $TOKEN" \
"https://api.motorical.com/api/public/v1/motor-blocks/$BLOCK_ID/logs?limit=5"

Common Test Failures

Connection Refused

  • Check firewall allows outbound on port 2587
  • Try port 587 as alternative
  • Verify DNS resolution: nslookup mail.motorical.com

Authentication Failed

  • Double-check username and password (not your Motorical login)
  • Ensure the Motor Block status is "active"
  • Regenerate password in the Motor Blocks dashboard if needed

TLS Handshake Failed

  • Ensure your client supports TLS 1.2+
  • Update your system's CA certificate bundle
  • Check system clock accuracy (must be within ±5 minutes)