WoW-CMS / BlizzCMS

BlizzCMS is a CMS built with CodeIgniter 3 for World of Warcraft emulators.
MIT License
96 stars 86 forks source link

🐛 [Bug Report]: Unable to send email using PHP SMTP. #156

Open lightningcal opened 1 month ago

lightningcal commented 1 month ago

BlizzCMS Version

2.0.0-beta.3

Emulator

CMaNGOS

PHP Version

PHP 8.1

Operating system

Linux

Web server

Apache

Database

MySQL 8

What happened?

I'm unable to get SMTP work, using AWS SES which requires TLS. I've verified my smtp creds are correct thru a separate script to send an email. I also tried gmail SMTP and that also failed. Is there a particular smtp service I should be using instead? SendGrid, Mailgun, etc...?

Here's screenshots of the AWS SES smtp error, and gmail smtp error. smtp Screenshot 2024-05-15 001436 image

How can the issue be reproduced?

Configure smtp in settings. Click verify to try to send a test email. The errors I attached are from that. I've also verified if you enable email verification then create an account you won't get the email.

Screenshots

No response

lightningcal commented 1 month ago

Apparently this is known codeigniter3 issue. https://stackoverflow.com/questions/70143134/codeigniter-3-unable-to-send-email-using-php-smtp-your-server-might-not-be-conf

I solved it in my copy of BlizzCMS by adding:

$this->email->set_newline("\r\n");

after: $this->email->message($message);

in the file: application/models/Auth_model.php