Taifa MailTaifa Mail Docs
Sending Emails

Send via SMTP

Connect your application or email client to Taifa Mail using standard SMTP credentials.

SMTP lets you send email through Taifa Mail from any application or email client that supports outbound SMTP.

Generate SMTP credentials

  1. Go to Settings -> SMTP Credentials.
  2. Click Create and pick one of your verified domains. SMTP credentials can only be created for a domain whose status is verified.
  3. Taifa Mail generates a username and a password. The username is derived automatically from your account and the domain (it looks like a1b2c3d4@yourdomain.com); you do not choose it.
  4. Copy the password. It is shown only once.

A domain can have one active SMTP credential at a time. Requesting a second for the same domain returns a conflict; delete the existing one first.

Store your SMTP password securely. You cannot retrieve it after creation. If you lose it, delete the credential and create a new one. Deleting a credential immediately revokes SMTP access for that username.

SMTP settings

The create-credential response returns the exact host and port to use. The standard values are:

SettingValue
Hostmail.govconnect.ke
Port587
EncryptionSTARTTLS
AuthenticationUsername + Password
UsernameThe generated SMTP credential username
PasswordThe SMTP credential password (shown once at creation)

Code examples

Nodemailer (Node.js)

const nodemailer = require("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: '"Your Company" <hello@yourdomain.com>',
  to: "customer@example.com",
  subject: "Welcome aboard",
  html: "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
  text: "Welcome!\n\nThanks for signing up.",
});

Python (smtplib)

import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
 
msg = MIMEMultipart("alternative")
msg["From"] = "Your Company <hello@yourdomain.com>"
msg["To"] = "customer@example.com"
msg["Subject"] = "Welcome aboard"
 
msg.attach(MIMEText("Welcome!\n\nThanks for signing up.", "plain"))
msg.attach(MIMEText("<h1>Welcome!</h1><p>Thanks for signing up.</p>", "html"))
 
with smtplib.SMTP("mail.govconnect.ke", 587) as server:
    server.starttls()
    server.login("your_smtp_username", "your_smtp_password")
    server.send_message(msg)

Go (net/smtp)

package main
 
import (
	"net/smtp"
	"strings"
)
 
func main() {
	auth := smtp.PlainAuth("", "your_smtp_username", "your_smtp_password", "mail.govconnect.ke")
 
	to := []string{"customer@example.com"}
	msg := strings.Join([]string{
		"From: Your Company <hello@yourdomain.com>",
		"To: customer@example.com",
		"Subject: Welcome aboard",
		"MIME-Version: 1.0",
		"Content-Type: text/html; charset=\"utf-8\"",
		"",
		"<h1>Welcome!</h1><p>Thanks for signing up.</p>",
	}, "\r\n")
 
	err := smtp.SendMail("mail.govconnect.ke:587", auth, "hello@yourdomain.com", to, []byte(msg))
	if err != nil {
		panic(err)
	}
}

PHP (PHPMailer)

<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
 
require 'vendor/autoload.php';
 
$mail = new PHPMailer(true);
 
$mail->isSMTP();
$mail->Host       = 'mail.govconnect.ke';
$mail->SMTPAuth   = true;
$mail->Username   = 'your_smtp_username';
$mail->Password   = 'your_smtp_password';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port       = 587;
 
$mail->setFrom('hello@yourdomain.com', 'Your Company');
$mail->addAddress('customer@example.com', 'Jane Doe');
 
$mail->isHTML(true);
$mail->Subject = 'Welcome aboard';
$mail->Body    = '<h1>Welcome!</h1><p>Thanks for signing up.</p>';
$mail->AltBody = "Welcome!\n\nThanks for signing up.";
 
$mail->send();

Thunderbird

  1. Open Account Settings → Outgoing Server (SMTP) → Add.
  2. Enter the following:
    • Server Name: mail.govconnect.ke
    • Port: 587
    • Connection Security: STARTTLS
    • Authentication Method: Normal password
    • User Name: Your SMTP credential username
  3. Click OK and enter your SMTP password when prompted.

Gmail "Send as"

Gmail can send from an address on your verified domain through the relay via Settings → Accounts and Import → Send mail as. In Gmail's SMTP dialog, use server mail.govconnect.ke, port 587, your SMTP credential username and password, and select Secured connection using TLS.

Gmail verifies the address by emailing it a confirmation link, so a forward rule for that address pointing at your Gmail should exist before you start. For the full walkthrough, including the forward rule, defaults, and troubleshooting, see the Gmail integration guide.

SMTP credentials are separate from your API key. You can create multiple SMTP credentials for different applications and revoke them independently at Settings → SMTP Credentials.

On this page