Skip to main content

SMTP Setup

kuploy-cloud requires SMTP for email delivery in production. Email is used for user verification, password resets, billing alerts, and notification channels.

Why SMTP Is Required

Without SMTP configured:

  • Users cannot verify their email addresses
  • Password reset flows won't work
  • Email-based billing notifications are disabled
  • Team invite emails cannot be sent

Configuration Methods

SMTP can be configured through the admin dashboard or environment variables. Dashboard settings take priority over environment variables.

  1. Log in as a platform admin
  2. Go to AdminSMTP
  3. Enter your SMTP settings
  4. Click Test to verify
  5. Click Save

Settings are stored encrypted in the database and take effect immediately — no restart required.

Method 2: Environment Variables

Set these in your .env file or Kubernetes secret:

VariableDescriptionExample
SMTP_HOSTSMTP server hostnamesmtp.mailgun.org
SMTP_PORTSMTP port587
SMTP_USERAuthentication usernamepostmaster@mg.example.com
SMTP_PASSAuthentication passwordyour-smtp-password
SMTP_FROMSender email addressnoreply@example.com
SMTP_FROM_NAMESender display nameMy Platform

Method 3: Kubernetes Secret

For Kubernetes deployments:

# Encode values
echo -n "smtp.mailgun.org" | base64

# Patch the secret
kubectl patch secret kuploy-secrets -n kuploy -p '{
"data": {
"SMTP_HOST": "<base64-host>",
"SMTP_PORT": "<base64-port>",
"SMTP_USER": "<base64-user>",
"SMTP_PASS": "<base64-pass>",
"SMTP_FROM": "<base64-from>"
}
}'

# Restart to apply
kubectl rollout restart deployment/kuploy -n kuploy

Any SMTP service works. Common choices:

ProviderFree TierNotes
Mailgun100 emails/dayPopular for transactional email
SendGrid100 emails/dayEasy setup, good deliverability
Amazon SES62,000/month (with EC2)Cheapest at scale
Postmark100 emails/monthFocused on transactional email
Resend3,000 emails/monthModern API, developer-friendly

Testing

After configuration, verify SMTP is working:

  1. Admin dashboard test — Go to AdminSMTP → click Test
  2. Sign-up flow — Create a new user account and check for the verification email
  3. Check spam folders — Transactional emails sometimes land in spam initially

Troubleshooting

Emails not sending

  • Verify SMTP credentials are correct
  • Check that the SMTP port is not blocked by your firewall
  • Ensure the "from" address is verified with your SMTP provider

Emails going to spam

  • Set up SPF, DKIM, and DMARC records for your sending domain
  • Use a dedicated sending domain (not a free email provider)
  • Ensure the "from" address matches your domain

Connection timeout

  • Port 587 (STARTTLS) is recommended — port 25 is often blocked
  • Check that your Kubernetes cluster allows outbound connections on the SMTP port
  • Verify the SMTP host is resolvable from within your cluster