Taifa MailTaifa Mail Docs
Security

SMTP Credentials

Create SMTP credentials to send email through Taifa Mail using any SMTP client or library.

SMTP credentials let you send email through Taifa Mail using the standard SMTP protocol. Use them with any programming language, framework, or email client that supports SMTP.

Creating SMTP credentials

  1. Go to SettingsSMTP Credentials.
  2. Click Create.
  3. Select the verified domain the credential is linked to. The domain must be verified first - credentials cannot be created for an unverified domain.
  4. Click Create.
  5. Copy the username and password immediately.

The username is generated for you in the form <id>@yourdomain.com. The host, port, username, and password are all shown on the creation screen.

The SMTP password is shown only once at creation time. Store it securely. If you lose it, delete the credential and create a new one.

Each verified domain can have one active SMTP credential at a time. If a credential already exists for a domain, delete it before creating a new one. The number of credentials you can hold also depends on your plan.

SMTP connection settings

The exact host is shown on the creation screen alongside your username and password. Use those values rather than copying them from here.

SettingValue
Hostmail.govconnect.ke (shown at creation)
Port587
EncryptionSTARTTLS
UsernameGenerated, shown at creation (format: <id>@yourdomain.com)
PasswordShown at creation

Code examples

Python (smtplib)

import smtplib
from email.mime.text import MIMEText
 
msg = MIMEText("<p>Hello from Taifa Mail!</p>", "html")
msg["Subject"] = "Test email"
msg["From"] = "hello@yourdomain.com"
msg["To"] = "recipient@example.com"
 
with smtplib.SMTP("mail.govconnect.ke", 587) as server:
    server.starttls()
    server.login("your_smtp_username", "your_smtp_password")
    server.send_message(msg)

Node.js (Nodemailer)

import nodemailer from "nodemailer";
 
const transporter = nodemailer.createTransport({
  host: "mail.govconnect.ke",
  port: 587,
  secure: false, // STARTTLS
  auth: {
    user: "your_smtp_username",
    pass: "your_smtp_password",
  },
});
 
await transporter.sendMail({
  from: "hello@yourdomain.com",
  to: "recipient@example.com",
  subject: "Test email",
  html: "<p>Hello from Taifa Mail!</p>",
});

Django (settings.py)

EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "mail.govconnect.ke"
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "your_smtp_username"
EMAIL_HOST_PASSWORD = "your_smtp_password"
DEFAULT_FROM_EMAIL = "hello@yourdomain.com"

Laravel (.env)

MAIL_MAILER=smtp
MAIL_HOST=govconnect.ke
MAIL_PORT=587
MAIL_USERNAME=your_smtp_username
MAIL_PASSWORD=your_smtp_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello@yourdomain.com

Revoking credentials

  1. Go to SettingsSMTP Credentials.
  2. Click Delete next to the credential.
  3. Confirm.

Revocation takes effect immediately. Any SMTP connection using the deleted credential will be rejected.

Use separate SMTP credentials for each application or environment. This makes it easy to revoke access for a single system without affecting others.

On this page