# Microsoft SMTP Mail Server problems

**URL:** <https://community.modx.com/t/microsoft-smtp-mail-server-problems/7073>\
**Category:** Support\
**Created:** [September 22, 2023, 9:58am UTC](https://community.modx.com/t/microsoft-smtp-mail-server-problems/7073 "2023-09-22T09:58:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tm2000](https://community.modx.com/user_avatar/community.modx.com/tm2000/32/178_2.png) [@tm2000](https://community.modx.com/u/tm2000)\
**Post date:** [September 22, 2023, 9:58am UTC](https://community.modx.com/t/microsoft-smtp-mail-server-problems/7073/1 "2023-09-22T09:58:17Z")

</div>

Hi all,

I’m trying to get Modx to send mail via the client’s SMTP server, as the php mailer wasn’t getting through their firewall.

I have a dedicated email address set up with all the credentials, but wondered if anyone has had issues with Microsoft Outlook mail servers before?

I’m using Bob’s brilliant Quick Email snippet to debug, but it just says ‘_SMTP ERROR: Failed to connect to server: Connection timed out (110)_’.

Below are the settings I’m using - anyone using Microsoft mail servers notice anything wrong here?

```auto
mail_smtp_auth	Yes
mail_smtp_autotls	Yes
mail_smtp_hosts	mydomain-com.mail.protection.outlook.com
mail_smtp_keepalive	No
mail_smtp_pass	********
mail_smtp_port	587
mail_smtp_secure	ssl
mail_smtp_single_to	No
mail_smtp_timeout	10
mail_smtp_user	user@mydomain.com
mail_use_smtp	Yes

```

Thanks guys!  
Andy

---

<div class="post-metadata">

**Author:** ![tm2000](https://community.modx.com/user_avatar/community.modx.com/tm2000/32/178_2.png) [@tm2000](https://community.modx.com/u/tm2000)\
**Post date:** [September 22, 2023, 10:04am UTC](https://community.modx.com/t/microsoft-smtp-mail-server-problems/7073/2 "2023-09-22T10:04:04Z")

</div>

I’ve also tried the mail server of:

```auto
smtp.office365.com

```

But still the same error.

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [September 22, 2023, 10:53am UTC](https://community.modx.com/t/microsoft-smtp-mail-server-problems/7073/3 "2023-09-22T10:53:53Z")

</div>

In this article

> **[Using Office 365 for Sending Email](https://support.modx.com/hc/en-us/articles/115003196667-Using-Office-365-for-Sending-Email)**
>
> Note: Microsoft Office 365 no longer supports Basic authentication using a username (email address) and a password. As such, it may not be possible to use this method as MODX Revolution doesn't sup...

they write to set “SMTP Connection Prefix” (I think that’s the setting `mail_smtp_secure` now) to `tls`.  
Maybe you could try that.

---

<div class="post-metadata">

**Author:** ![tm2000](https://community.modx.com/user_avatar/community.modx.com/tm2000/32/178_2.png) [@tm2000](https://community.modx.com/u/tm2000)\
**Post date:** [September 22, 2023, 11:13am UTC](https://community.modx.com/t/microsoft-smtp-mail-server-problems/7073/4 "2023-09-22T11:13:33Z")

</div>

Boom. Sorted. Thanks Harry…!!!

---

<div class="post-metadata">

**Author:** ![system](https://community.modx.com/user_avatar/community.modx.com/system/32/2_2.png) [@system](https://community.modx.com/u/system)\
**Post date:** [September 24, 2023, 11:13am UTC](https://community.modx.com/t/microsoft-smtp-mail-server-problems/7073/5 "2023-09-24T11:13:39Z")

</div>

Closed on September 24, 2023, 11:13am UTC

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.
