Software⏱️ 3 min readπŸ“… 2026-06-19

How to Fix: smtp connection error when sending mail only on *wired* connection, not wireless

SMTP connection error on wired connection not sending mail via mu4e in Emacs.

Quick Answer: Check if your email account is set up correctly for SMTP and ensure that the Gmail SMTP server is not blocked by your organization's firewall.

The issue of SMTP connection errors when sending mail only on wired connections, yet not on wireless, can be frustrating for users. This problem affects individuals who rely on their work's wired internet connection to send emails through services like mu4e in Emacs.

This error is particularly vexing because it prevents users from efficiently communicating with colleagues and clients over email, leading to potential delays in work and communication issues.

πŸ” Why This Happens

  • The primary reason for this issue lies in the differences between wireless and wired network connections. Wired connections typically provide a more stable and secure connection compared to wireless networks, which can be affected by various factors such as interference from other devices or physical obstructions.
  • Another possible cause could be related to the specific settings or configuration of the SMTP server used for sending emails. This might include issues with the server's authentication mechanisms or the specific port numbers used for connections.

βœ… Best Solutions to Fix It

Configuring Emacs to Use a Different Port Number

  1. Step 1: Open your Emacs configuration file (usually named '.emacs.d/init.el') and add the following line at the end: `(setq smtp-server-port 465)`. This sets the port number used for SMTP connections to the default port, which is often less prone to issues.
  2. Step 2: Save the changes to your configuration file and restart Emacs. This ensures that the updated settings are applied when you connect via wired networks.
  3. Step 3: If you're still experiencing issues, try setting the port number to a different value (e.g., 587) using the following line: `(setq smtp-server-port 587)`.

Using a Third-Party SMTP Client

  1. Step 1: Consider installing and configuring a third-party SMTP client, such as MUA (Mail User Agent), which can handle issues with the built-in Emacs SMTP functionality. This might involve downloading the MUA package using your distribution's package manager and adding it to your Emacs configuration file.
  2. Step 2: Configure the MUA according to its documentation and your specific email provider's settings. This may involve setting up authentication mechanisms, specifying the correct port numbers, or configuring other settings as needed.

πŸ’‘ Conclusion

To resolve the SMTP connection error when sending mail only on wired connections, try configuring Emacs to use a different port number or consider using a third-party SMTP client. By implementing these steps, you should be able to send emails successfully over your wired internet connection.

Did this fix your problem?

If not, try searching for specific error codes.

πŸ” Search Error Database

❓ Frequently Asked Questions