Skip to content

Commit

Permalink
#282 -- Envio de emails automáticos não está funcionando
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonmoura committed Apr 6, 2022
1 parent c50e1d4 commit 507f347
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/classes/Tools.php
Expand Up @@ -103,9 +103,10 @@ public static function sendMail($body,$altbody,$subject,$to,$fromMail=EMAIL_FROM
$objMailer->Username = EMAIL_USERNAME;
$objMailer->Password = EMAIL_PASSWORD;
$objMailer->IsSMTP();
$objMailer->SMTPAuth = true;
$objMailer->SMTPSecure = 'tls';

$objMailer->SMTPAuth = true;
if ( EMAIL_SECURE && in_array(EMAIL_SECURE, array('ssl', 'tls')) ) {
$objMailer->SMTPSecure = EMAIL_SECURE;
}
$objMailer->IsHTML(true);
$objMailer->ClearAddresses();
foreach ($to as $user){
Expand Down
1 change: 1 addition & 0 deletions server/config.php.template
Expand Up @@ -112,6 +112,7 @@ define('LOG_FILE_MAIL',APP_BASEDIR.'/mail.log');
define("EMAIL_HOST",'pombo.bireme.br');
define("EMAIL_FROM",'appservplat@bireme.org');
define("EBLUEINFO_EMAIL_FROM",'eblueinfo@bireme.org');
define("EMAIL_SECURE",'');
define("EMAIL_USERNAME",'');
define("EMAIL_PASSWORD",'');
define("EMAIL_EBLUEINFO_TEMPLATE",APP_BASEDIR.'/templates/mail/sendEBlueinfoEMail.#LANG#.tpl');
Expand Down

0 comments on commit 507f347

Please sign in to comment.