Taifa MailTaifa Mail Docs
Security

SMTP Credentials

Create SMTP credentials for official government systems and mail clients.

SMTP credentials let government systems send official email through Taifa Mail using the standard SMTP protocol. Use them with service portals, case-management tools, legacy systems, or email clients that support SMTP.

Credentials can only be created for a domain ICTA has already approved and that you have verified. See Request domains & mailboxes from ICTA.

Creating SMTP credentials

  1. Go to DeveloperSMTP.
  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>@health.go.ke. 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.

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>@health.go.ke)
PasswordShown at creation

Code examples

Python (smtplib)

import smtplib
from email.mime.text import MIMEText
 
msg = MIMEText("<p>Your service request has been received.</p>", "html")
msg["Subject"] = "Service request received"
msg["From"] = "info@health.go.ke"
msg["To"] = "citizen@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: "info@health.go.ke",
  to: "citizen@example.com",
  subject: "Service request received",
  html: "<p>Your service request has been received.</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 = "info@health.go.ke"

Laravel (.env)

MAIL_MAILER=smtp
MAIL_HOST=mail.govconnect.ke
MAIL_PORT=587
MAIL_USERNAME=your_smtp_username
MAIL_PASSWORD=your_smtp_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=info@health.go.ke

Revoking credentials

  1. Go to DeveloperSMTP.
  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 one government system without affecting other services.

On this page