Self Hosted error 500 when editing email settings (SMTP, Mailgun, sendmail)

As stated, everytime I install from Softaculous and go to enter email info, when I hit save, the site locks up with a 500 error and kills the site. I have tried this with multiple domains to no avail

what do the error logs say?