Contact forms that do not send. WooCommerce order notifications that never arrive. WordPress password reset emails that disappear. These are among the most frequently reported problems on Canadian hosting accounts, and in the vast majority of cases the cause is the same: reliance on PHP's built-in mail() function, which was never a reliable mechanism for transactional email delivery.
Why PHP mail() is unreliable
PHP's mail() function uses the server's sendmail mail transfer agent to send email. On a shared hosting server, this means email originating from whatever shared IP address your hosting account uses, with minimal authentication and no DKIM signing in most default configurations. The IP reputation of that shared sending IP affects every account sending through it. If another account on the same server has been sending spam, your legitimate mail() output degrades in deliverability immediately and you have no control over it.
Configuring SMTP in WordPress on Canadian hosting
WordPress uses PHP mail() by default. The WP Mail SMTP plugin replaces this with SMTP-based sending. Install WP Mail SMTP and configure one of the following. Using your Canadian hosting account's SMTP server: enter the SMTP host (typically mail.yourdomain.ca), port 587 with TLS or port 465 with SSL, your full email address as the username, and your email password. This keeps email within your Canadian hosting environment and is the simplest option. For higher volume sending or better deliverability analytics, services like Mailgun (with Canadian data residency options) or Postmark provide SMTP endpoints with delivery tracking and bounce management. After configuring SMTP, use WP Mail SMTP's test email feature to verify delivery. Check the full email headers of the received message to confirm DKIM signing is present and SPF is passing.
Non-WordPress PHP applications on Canadian hosting
For PHP applications not running WordPress, use PHPMailer directly rather than mail(). Install it via Composer: composer require phpmailer/phpmailer. A basic SMTP configuration:
$mail = new PHPMailer\PHPMailer\PHPMailer(true); $mail->isSMTP(); $mail->Host = 'mail.yourdomain.ca'; $mail->SMTPAuth = true; $mail->Username = '[email protected]'; $mail->Password = 'your_password'; $mail->SMTPSecure = PHPMailer\PHPMailer\PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587;
Store SMTP credentials in environment variables rather than hardcoded in application code to prevent credential exposure if the codebase is accidentally shared or committed to a public repository.
Diagnosing mail delivery problems
When mail is not arriving, check in order. Check the server's mail log (/var/log/mail.log on Ubuntu) for SMTP connection errors and authentication failures. Check the receiving domain's spam folder. Check the sending IP against MXToolbox Blacklist Check to see if your server's IP is listed. Use Mailtrap or Ethereal.email as the recipient to see full email headers and verify DKIM and SPF before sending to real addresses.
Gotekky
Need help deciding what to do next?
Tell us what you are seeing and what outcome you need. We will identify whether a managed service, scoped project or paid technical assessment is the right next step.