Skip to content

Commit

Permalink
Fixed #289 -- Envio de e-mails não está funcionando
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonmoura committed Jun 7, 2023
1 parent 03fec0e commit 7ced7f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/classes/Tools.php
Expand Up @@ -103,7 +103,7 @@ 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->SMTPAuth = EMAIL_SMTP_AUTH;
if ( EMAIL_PORT ) {
$objMailer->Port = EMAIL_PORT;
}
Expand All @@ -117,7 +117,10 @@ public static function sendMail($body,$altbody,$subject,$to,$fromMail=EMAIL_FROM
}
$objMailer->Subject = mb_encode_mimeheader($subject, CHARSET);
$objMailer->Body = $body;
$objMailer->AltBody = $altbody;
$objMailer->AltBody = $altbody;
if ( EMAIL_DEBUG ) {
$objMailer->SMTPDebug = 2;
}

if(!$objMailer->Send()){
$retValue = false;
Expand Down
2 changes: 2 additions & 0 deletions server/config.php.template
Expand Up @@ -114,12 +114,14 @@ define("EMAIL_FROM",'appservplat@bireme.org');
define("EBLUEINFO_EMAIL_FROM",'eblueinfo@bireme.org');
define("EMAIL_PORT",'');
define("EMAIL_SECURE",'');
define("EMAIL_SMTP_AUTH",false);
define("EMAIL_USERNAME",'');
define("EMAIL_PASSWORD",'');
define("EMAIL_EBLUEINFO_TEMPLATE",APP_BASEDIR.'/templates/mail/sendEBlueinfoEMail.#LANG#.tpl');
define("EMAIL_NEWPASSWORD_TEMPLATE",APP_BASEDIR.'/templates/mail/sendNewEMail.#LANG#.tpl');
define("EMAIL_CONFIRMATION_TEMPLATE",APP_BASEDIR.'/templates/mail/confirmEMail.#LANG#.tpl');
define("NEW_PASS_CONFIRMATION_TEMPLATE",APP_BASEDIR.'/templates/mail/newPassEMail.#LANG#.tpl');
define("EMAIL_DEBUG",false);

/* reCAPTCHA */
define("RECAPTCHA_API_URL",'https://www.google.com/recaptcha/api/siteverify?');
Expand Down

0 comments on commit 7ced7f2

Please sign in to comment.