Skip to content

Commit

Permalink
Update: PHPMailer, scssphp
Browse files Browse the repository at this point in the history
  • Loading branch information
evgip committed Jul 29, 2022
1 parent 9ae47f2 commit f36bc1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Controllers/Post/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function index($type)
'data' => [
'post' => $content,
'answers' => $answers,
'recommend' => PostModel::postSimilars($content['post_id'], $this->user, $facets[0]['facet_id']),
'recommend' => PostModel::postSimilars($content['post_id'], $this->user, $facets[0]['facet_id'] ?? null),
'related_posts' => $related_posts ?? '',
'post_signed' => SubscriptionModel::getFocus($content['post_id'], $this->user['id'], 'post'),
'facets' => $facets,
Expand Down
6 changes: 4 additions & 2 deletions app/Libraries/SendEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function send($email, $subject = '', $message = '')
if (config('integration.smtp')) {

try {
//Server settings
// Server settings
// $mail->SMTPDebug = SMTP::DEBUG_SERVER;
$mail->isSMTP();
$mail->CharSet = "utf-8";
Expand All @@ -88,7 +88,9 @@ public static function send($email, $subject = '', $message = '')
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
} else {
$mail->isSendmail();
// При включенной возможно варианты (if enabled, options are possible)
// https://github.com/PHPMailer/PHPMailer/issues/2465?ysclid=l665mmji6w128130571#issuecomment-897547946
// $mail->isSendmail();
$mail->CharSet = "utf-8";
$mail->setFrom(config('general.email'), config('meta.title'));
$mail->addAddress($email, '');
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"phphleb/imageresizer": "dev-master",
"phphleb/debugpan": "1.*",
"phphleb/radjax": "dev-master",
"scssphp/scssphp": "^1.10.3",
"scssphp/scssphp": "^1.10.5",
"cocur/slugify": "^4.1",
"phpmailer/phpmailer": "^6.5",
"phpmailer/phpmailer": "^6.6.3",
"erusev/parsedown": "^1.8.0@beta",
"wamania/php-stemmer": "^3.0",
"donatj/phpuseragentparser": "dev-master",
Expand Down

0 comments on commit f36bc1b

Please sign in to comment.