Page 1 of 1

Email Set-up in Windows

Posted: 06 May 2023, 06:14
by Allan M
Hi Sirs,
Been using OpenCats for year as I am an HR Professional and OpenCats has been a great help to me and where I made customizations according to my need.
However, I have not tried the email feature yet, and this is one of the best feature worth a try. After days of searching and attempt to configure, I failed sadly :( . am begging for your help Dear Sirs.

Fatal error: Uncaught exception 'PHPMailer\PHPMailer\Exception' with message 'SMTP Error: Could not authenticate.' in C:\xampp\htdocs\OpenCATS\vendor\phpmailer\phpmailer\src\PHPMailer.php:2212 Stack trace: #0 C:\xampp\htdocs\OpenCATS\vendor\phpmailer\phpmailer\src\PHPMailer.php(2019): PHPMailer\PHPMailer\PHPMailer->smtpConnect(Array) #1 C:\xampp\htdocs\OpenCATS\vendor\phpmailer\phpmailer\src\PHPMailer.php(1678): PHPMailer\PHPMailer\PHPMailer->smtpSend('Date: Sat, 6 Ma...', '--b1=_7kVJcVFU9...') #2 C:\xampp\htdocs\OpenCATS\vendor\phpmailer\phpmailer\src\PHPMailer.php(1516): PHPMailer\PHPMailer\PHPMailer->postSend() #3 C:\xampp\htdocs\OpenCATS\lib\Mailer.php(241): PHPMailer\PHPMailer\PHPMailer->send() #4 C:\xampp\htdocs\OpenCATS\lib\Mailer.php(135): Mailer->send(Array, Array, 'CATS Test E-Mai...', 'This is a CATS ...', true, true, Array, 78, true) #5 C:\xampp\htdocs\OpenCATS\ajax\testEmailSettings.php(93): Mailer->sendToOne(Array, 'CATS Test E-Mai...', 'This is a CATS ...', true) #6 C:\xampp\htdocs\OpenCATS\ajax.php(115): i in C:\xampp\htdocs\OpenCATS\vendor\phpmailer\phpmailer\src\PHPMailer.php on line 2212

Re: Email Set-up in Windows

Posted: 13 Dec 2023, 10:39
by RussH
Hi there,

from the error this is a simple smtp authentication error. So wrong credentials are being used. Can you ensure you're using the correct port, username, password etc - and if you're using gmail you will have to have enabled IMAP and 'lower security' and probably use an app password (they make it needlessly complicated). Gmail is actively discouraging people from using external services to email outbound through their accounts. I tend to use services like mailgun.com for application traffic (including opencats)

Please check the config in your config.php file, should be similar..
Code: Select all
define('MAIL_MAILER', 3);

/* Sendmail Settings. You don't need to worry about this unless MAIL_MAILER
 * is set to 2.
 */
define('MAIL_SENDMAIL_PATH', "/sbin/sendmail");

/* SMTP Settings. You don't need to worry about this unless MAIL_MAILER is
 * set to 3. If your server requires authentication, set MAIL_SMTP_AUTH to
 * true and configure MAIL_SMTP_USER and MAIL_SMTP_PASS.
 */
define('MAIL_SMTP_HOST', "smtp.eu.mailgun.org");
define('MAIL_SMTP_PORT', "587");
define('MAIL_SMTP_AUTH', "true");
define('MAIL_SMTP_USER', "[email protected]");
define('MAIL_SMTP_PASS', "secretpassgoeshere");
//Options: '', 'ssl' or 'tls'
define('MAIL_SMTP_SECURE', 'tls');

Re: Email Set-up in Windows

Posted: 22 Jul 2024, 08:23
by dockcactus
Thanks alot! Although I haven't used the email function yet, this is among the finest ones phrazleworth experimenting on.

Re: Email Set-up in Windows

Posted: 25 Sep 2024, 08:19
by nicklesta
Thank you RussH so muchslope