mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
send email log smtp info
This commit is contained in:
@@ -298,9 +298,9 @@ class ToolRepository extends BaseRepository
|
|||||||
public function sendMail($to, $subject, $body): bool
|
public function sendMail($to, $subject, $body): bool
|
||||||
{
|
{
|
||||||
$log = "[SEND_MAIL]";
|
$log = "[SEND_MAIL]";
|
||||||
do_log("$log, to: $to, subject: $subject, body: $body");
|
|
||||||
$factory = new EsmtpTransportFactory();
|
$factory = new EsmtpTransportFactory();
|
||||||
$smtp = Setting::getFromDb('smtp');
|
$smtp = Setting::getFromDb('smtp');
|
||||||
|
do_log("$log, to: $to, subject: $subject, body: $body, smtp: " . json_encode($smtp));
|
||||||
$encryption = null;
|
$encryption = null;
|
||||||
if (isset($smtp['encryption']) && in_array($smtp['encryption'], ['ssl', 'tls'])) {
|
if (isset($smtp['encryption']) && in_array($smtp['encryption'], ['ssl', 'tls'])) {
|
||||||
$encryption = $smtp['encryption'];
|
$encryption = $smtp['encryption'];
|
||||||
|
|||||||
Reference in New Issue
Block a user