# SMTP error causes MODX Error log to crash?

**URL:** <https://community.modx.com/t/smtp-error-causes-modx-error-log-to-crash/9013>\
**Category:** Development\
**Created:** [March 6, 2026, 3:51am UTC](https://community.modx.com/t/smtp-error-causes-modx-error-log-to-crash/9013 "2026-03-06T03:51:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_willis](https://community.modx.com/user_avatar/community.modx.com/dev_willis/32/1721_2.png) [@dev\_willis](https://community.modx.com/u/dev_willis)\
**Post date:** [March 6, 2026, 3:51am UTC](https://community.modx.com/t/smtp-error-causes-modx-error-log-to-crash/9013/1 "2026-03-06T03:51:21Z")

</div>

I was just setting up SMTP authentication and when I tested it by trying to send a new password email to myself, I got an error saying it failed to send. I went to the modx error log to see what it said, but the error log wouldn’t load. It just sat there saying “Working…” So I checked it via SSH and found this:

```auto
/www/core/cache/logs $ cat error.log
[2026-03-05 21:35:36] (ERROR @ /www/core/src/Revolution/modUser.php : 959) Error while sending mail to email@gmail.com: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting SMTP server error: QUIT command failed Detail: M
IA▒▒z▒8▒▒▒▒Er
I▒p74▒ml▒▒ɎID▒)c▒w@▒>▒?%▒'▒\▒C▒▒2▒[▒4▒▒▒▒YA-▒1▒▒▒▒▒▒!s▒▒▒L▒▒6d▒$▒▒ͧ▒▒D▒▒▒ņX▒k▒b▒▒▒▒▒▒`J1▒ S▒*V▒4}V▒▒1H▒▒▒▒R▒▒▒P▒▒t▒l_br▒▒▒d▒▒▒▒▒D▒▒▒▒lr▒Ɉ▒▒"̼▒▒g▒bc▒;>@62▒2O▒IdԱI▒T▒;▒:▒2▒\a[▒▒2
▒8}▒▒c▒F▒@ ▒▒▒▒|Z▒J[▒'▒▒▒:▒1▒▒ܟ▒▒
             ▒;X▒I▒~▒▒▒▒4▒▒T&-▒}▒Oݍ▒3ly▒
/www/core/cache/logs $ PuTTYPuTTY

```

I have no idea what to make of this. Something about that machine language also causes the screen to jump up and leaves that `PuTTYPuTTY` in the command prompt as well. Very weird.

Edit:  
I discovered that setting `mail_smtp_secure` to ssl instead of tls causes the machine language and subsequent inability to load the error log to go away.

---

<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:** [March 6, 2026, 8:34am UTC](https://community.modx.com/t/smtp-error-causes-modx-error-log-to-crash/9013/2 "2026-03-06T08:34:46Z")

</div>

Your email-address is in the error message. So you might want to edit the post, to remove it.

* * *

I have no idea why the error outputs “machine language” though.  
It looks like whatever the _PHPMailer_ (an external library) returns in the “ErrorInfo” (`$mail->mailer->ErrorInfo`) just gets appended to the error message for the MODX error log.

> <https://github.com/modxcms/revolution/blob/6384e2e30d059be05687b51b52f144b8b7bef183/core/src/Revolution/modUser.php#L958>

---

<div class="post-metadata">

**Author:** ![dev\_willis](https://community.modx.com/user_avatar/community.modx.com/dev_willis/32/1721_2.png) [@dev\_willis](https://community.modx.com/u/dev_willis)\
**Post date:** [March 6, 2026, 2:42pm UTC](https://community.modx.com/t/smtp-error-causes-modx-error-log-to-crash/9013/3 "2026-03-06T14:42:29Z")

</div>

I guess something must be wrong with the SMTP server I was using. I switched to a different one and everything’s fine now. 🤷‍♂️
