SMTP Error(220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.)

SMTP Error(220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.)

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

SMTP Error(220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.)

The error message SMTP Error: Could not connect to mail.domain.com often masks a specific rejection code from the server: (220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.). This is not a configuration mistake within your application logic; it is an explicit policy enforcement by the receiving mail server.

When you configure CodeIgniter to connect to port 25, as seen in your snippet, you are attempting to use the raw SMTP protocol for email transmission. Historically, port 25 was designed for Mail Exchange (MX) servers to relay messages between domains. However, modern hosting providers and ISPs have largely abandoned using port 25 for outgoing client mail. They view connections originating from residential IP ranges or dynamic IPs as high-risk sources for spam. By rejecting the connection with this specific message, the server is telling you that your current environment does not meet their security requirements for relaying mail.

The fact that you tried switching to port 465 and using ssl:// syntax indicates you are attempting to use implicit TLS. While port 465 was originally designed for SSL (Secure Socket Layer), it has been deprecated by the IETF in favor of STARTTLS on port 587. Many modern servers, including cPanel hosting environments like the one implied by your secureserver.net attempt, have stopped accepting implicit SSL entirely or require specific authentication headers that standard PHP libraries do not send by default.

The core issue is almost certainly IP reputation. If you are sending email from a shared hosting environment, your IP address likely belongs to a data center known for spam. Reputable mail servers (like the one at mail.domain.com in your config) maintain blocklists that filter out these IPs before an SMTP handshake even completes. The 220 response is the server's firewall speaking directly to you. No amount of tweaking PHPMailer or CodeIgniter settings can override a hard IP ban.

To resolve this, you must change how you authenticate and route your emails. You need to request access from your hosting provider to use their dedicated SMTP credentials, often provided via cPanel. These credentials usually include:

  1. Host: Typically mail.yourdomain.com or a specific subdomain provided by the host.
  2. Port: Use port 587 with STARTTLS encryption. This is the modern standard for submission. If your host supports port 465, ensure you are using explicit SSL (not implicit SSL) and that your library supports it.
  3. Authentication: You must enable SMTP authentication in your CodeIgniter config. Ensure $config['smtp_auth'] = TRUE; is set, along with your username and password.

In the context of CodeIgniter 2.2.2, updating the configuration is straightforward, but the underlying network path is the bottleneck. If you continue to receive this rejection, contact your hosting support specifically asking for an "IP whitelist" or permission to use their SMTP relay without triggering spam filters. They may be able to provide a dedicated static IP address that has a clean reputation, which will allow the transaction to proceed on port 25 or 587 without being blocked immediately.

Alternatively, consider moving your email delivery logic to a specialized transactional email service like SendGrid, Mailgun, or Amazon SES. These services offer APIs that handle SMTP complexities and deliverability guarantees. If you are building a larger application in Laravel, the team at https://laravelcompany.com often discusses best practices for integrating these services into modern stacks to ensure high delivery rates without relying on shared hosting SMTP ports.

Until your IP is whitelisted or you switch providers, any attempt to send bulk emails from this environment will result in rejection. The error message is a protective mechanism; ignoring it and trying different ports will only delay the inevitable block.

Our network