Sending Email with SMTP in CodeIgniter — a practical guide to CodeIgniter SMTP email with clear examples you can reuse in real projects.
CodeIgniter Tutorial Series (50/74). Prefer one article? Read the complete CodeIgniter tutorial.
Short description
SMTP is preferred over PHP mail() in real apps. Store host/user/pass in `.env`.
Email config (concept)
public string $protocol = 'smtp';
public string $SMTPHost = 'smtp.example.com';
public string $SMTPUser = 'apikey';
public string $SMTPPass = 'secret';
public int $SMTPPort = 587;
public string $SMTPCrypto = 'tls';