Not Sending Emails via Shared Host on ze.com using Microsoft 365 Email

Abstract: Resolve email sending failures on ze.com shared hosting by configuring applications to use Microsoft 365 SMTP relay instead of blocked local servers.

Created: 2026-08-14 by

You can resolve email sending failures on ze.com shared hosting by configuring your application to use Microsoft 365 SMTP relay instead of the local mail server. Shared hosts often block port 25 or restrict outgoing connections, forcing you to route traffic through Microsoft’s authenticated endpoints with proper TLS encryption and credentials.

Understanding the Shared Hosting Constraint

When you host a website on ze.com using a shared plan, you typically have cPanel access but lack root privileges. This architectural limitation means that while you can receive emails via IMAP/POP3, sending them directly from your web application (like WordPress, Joomla, or a custom PHP script) is often restricted. The local Mail Transfer Agent (MTA) on shared servers frequently blocks outbound connections on standard ports like 25, 465, or 587 to prevent spam abuse. Even if these ports are open, the IP addresses of shared hosts are often blacklisted by major providers, causing your legitimate business emails to bounce or land in spam folders.

Microsoft 365 provides a robust solution for this scenario. By authenticating against Microsoft’s servers, you bypass the restrictions of your local hosting environment. This method ensures higher deliverability rates and maintains the professional appearance of your domain since the emails originate from Microsoft’s trusted infrastructure rather than a potentially flagged shared hosting IP.

Configuring SMTP Settings in Microsoft 365

To send emails via Microsoft 365, you must first ensure your account has the necessary permissions. In most cases, a standard user license allows SMTP submission. However, some organizations require specific configuration changes by an administrator. You will need the following details:

  • SMTP Server Address: smtp.office365.com
  • Port: 587
  • Encryption: STARTTLS (often labeled as "TLS" or "STARTTLS" in client settings)
  • Authentication: Required (Username: full email address, Password: account password)

If you are using a modern application stack, ensure that your system clock is synchronized. Incorrect time settings can cause SSL/TLS handshake failures, leading to authentication errors even when credentials are correct.

Implementing the Solution in Common Platforms

The implementation steps vary slightly depending on the platform you are using. Below are instructions for the most common scenarios encountered by ze.com users.

PHP Applications (WordPress, Custom Scripts)

For PHP-based applications, you should avoid using the default mail() function. Instead, integrate a library like PHPMailer or SwiftMailer. Configure the transport to use SMTP with the following parameters:

$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host       = 'smtp.office365.com';
$mail->SMTPAuth   = true;
$mail->Username   = '[email protected]';
$mail->Password   = 'your-password';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port       = 587;

Ensure that your firewall rules on the ze.com server allow outbound connections to port 587. If you are using a plugin like WP Mail SMTP, select "Other SMTP" as the mailer and input the above details.

Python Applications

If you are running a Python application, use the smtplib module. Connect securely using starttls():

import smtplib

server = smtplib.SMTP('smtp.office365.com', 587)
server.starttls()
server.login('[email protected]', 'your-password')
server.sendmail('[email protected]', '[email protected]', 'Message')
server.quit()

This approach works regardless of the underlying operating system on the shared host, as long as Python is installed and network access to external SMTP servers is permitted.

Troubleshooting Authentication Issues

If you encounter authentication failures, check for two common causes. First, verify that your Microsoft 365 account does not have Multi-Factor Authentication (MFA) enabled without using an App Password. Standard passwords may be rejected if MFA is active. Second, ensure that your ze.com hosting plan does not have additional security modules blocking outgoing SMTP traffic. Some shared hosting environments include mod_security rules that might interfere with large attachments or specific header formats.

Additionally, monitor the bounce messages. A "5.7.1 Client does not have permissions" error usually indicates incorrect credentials or insufficient mailbox rights. A connection timeout suggests a firewall issue. In such cases, contact ze.com support to confirm that port 587 is unblocked for your account.

Security Best Practices

Never store your Microsoft 365 password in plain text within your application code. Use environment variables or secure configuration files that are excluded from version control. Consider creating a dedicated service account for sending automated emails, which isolates the risk of credential exposure from your primary administrative account.

For related issues regarding Outlook client behavior, you might find it useful to review how to use Microsoft 365 Apps Enterprise in Outlook to ensure your desktop clients remain synchronized with these server-side changes.

Frequently Asked Questions

Why does my email still go to spam after switching to Microsoft 365 SMTP?

While Microsoft 365 improves deliverability, spam filters also check your domain's DNS records. Ensure you have valid SPF, DKIM, and DMARC records configured for your domain at ze.com. Without these, recipients' servers may distrust the origin of your messages despite using a reputable SMTP provider.

Can I use port 25 for Microsoft 365 email on shared hosting?

No, Microsoft 365 requires port 587 for STARTTLS or port 465 for implicit SSL/TLS. Port 25 is primarily used for server-to-server relay and is often blocked on shared hosting plans anyway. Using port 587 is the standard and recommended method for client submissions.

What happens if I enable MFA on my Microsoft 365 account?

Enabling Multi-Factor Authentication will break standard SMTP authentication unless you generate an App Password. You must create an App Password in your Microsoft security settings and use that specific string instead of your regular login password in your application configuration.

How do I debug SMTP connection timeouts on ze.com?

Use telnet or nc commands from your server shell to test connectivity: telnet smtp.office365.com 587. If the connection hangs, your hosting provider’s firewall is likely blocking outbound traffic. Contact ze.com support to whitelist the Microsoft SMTP endpoint or switch to a different port if available.

Is it safe to send bulk newsletters via Microsoft 365 SMTP?

Microsoft 365 SMTP is designed for transactional and low-volume communication, not bulk marketing. Sending high volumes of unsolicited emails can trigger rate limits or result in account suspension. For newsletters, consider using dedicated email marketing services like SendGrid or Mailchimp.

Do I need to change my MX records to use this setup?

No, changing MX records is only required if you want to receive email via Microsoft 365 instead of your current provider. To keep receiving email on your existing server while sending via Microsoft 365, leave your MX records unchanged and only configure the outgoing SMTP settings in your application.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More