SMTP options
SMTP options
I am trying to make email work using sendgrid api but it does not work. FormaLMS shows email sent but nothing happens.
What are these options used for in config file:
$cfg['use_smtp_database'] = 'on';
$cfg['use_smtp'] = 'on';
$cfg['smtp_debug']
how setting $cfg['smtp_debug'] to say 3 can help debug? what does $cfg['use_smtp_database'] do?
What are these options used for in config file:
$cfg['use_smtp_database'] = 'on';
$cfg['use_smtp'] = 'on';
$cfg['smtp_debug']
how setting $cfg['smtp_debug'] to say 3 can help debug? what does $cfg['use_smtp_database'] do?
Re: SMTP options
When $cfg['use_smtp_database'] is 'on', credentials and connection parameters are stored in the DB, and you can set them in the backend (configuration).
Per supporto GRATUITO contattatemi in privato qui
Re: SMTP options
There is problem with lib.mailer.php
SMTP values are not getting passed in SmtpAdm::getInstance()->
If I hardcode SMTP values in lib.mailer.php it works fine.
Where can we report bugs?
SMTP values are not getting passed in SmtpAdm::getInstance()->
If I hardcode SMTP values in lib.mailer.php it works fine.
Where can we report bugs?
Re: SMTP options
There is no public bug tracker.
You can post here your solution (if you have one).
You can post here your solution (if you have one).
Per supporto GRATUITO contattatemi in privato qui
Re: SMTP options
following is solution:
I am not sure why original code is not working though looks ok:
File: /appCore/models/SmtpAdm.php
Original ( does not work):
This works:
I am not sure why original code is not working though looks ok:
File: /appCore/models/SmtpAdm.php
Original ( does not work):
Code: Select all
public static function isEnabledDatabase()
{
$smtpConfigIsEnabled = Get::cfg('use_smtp_database');
switch ($smtpConfigIsEnabled) {
case 'on':
case 'true':
case true:
return true;
break;
default:
return false;
break;
}
}
Code: Select all
public static function isEnabledDatabase()
{
$smtpConfigIsEnabled = Get::cfg('use_smtp_database');
switch ($smtpConfigIsEnabled) {
case 'off':
return false;
break;
case 'on':
case 'true':
case true:
return true;
break;
default:
return false;
break;
}
}
Re: SMTP options
what die(var_dump($smtpConfigIsEnabled)) would return in the non working case?
Per supporto GRATUITO contattatemi in privato qui
-
- Newbie
- Posts: 6
- Joined: Wed Jul 28, 2021 7:00 am
Re: SMTP options
This Fixed my problem. Thank you!kamaldua wrote: ↑Wed Feb 16, 2022 1:28 pm following is solution:
I am not sure why original code is not working though looks ok:
File: /appCore/models/SmtpAdm.php
Original ( does not work):This works:Code: Select all
public static function isEnabledDatabase() { $smtpConfigIsEnabled = Get::cfg('use_smtp_database'); switch ($smtpConfigIsEnabled) { case 'on': case 'true': case true: return true; break; default: return false; break; } }
Code: Select all
public static function isEnabledDatabase() { $smtpConfigIsEnabled = Get::cfg('use_smtp_database'); switch ($smtpConfigIsEnabled) { case 'off': return false; break; case 'on': case 'true': case true: return true; break; default: return false; break; } }
Re: SMTP options
Hello kamaldua,
please consider sending your fix to the official repository, so the Forma Devs will be able to evaluate and add it to the official release
https://github.com/formalms/
Thankyou