This commit is contained in:
aozhiwei 2024-06-05 14:31:37 +08:00
parent 35f8d990c0
commit 0f842b848d

View File

@ -8,6 +8,7 @@ require_once('mt/LootConfig.php');
require_once('services/AwardService.php');
require_once('services/PropertyChgService.php');
require_once('services/LootService.php');
require_once('services/MailApiService.php');
require_once('models/Nft.php');
use phpcommon\SqlHelper;
@ -268,4 +269,41 @@ END
}
}
public function sendMail()
{
$to = getReqVal('to', '');
$subject = getReqVal('subject', '');
$content = getReqVal('content', '');
$attachments = getReqVal('attachments', '');
$unikey = 'test:' . uniqid();
SqlHelper::upsert
(myself()->_getMailMysql(),
't_sys_mail',
array(
'unikey' => $unikey
),
array(
),
array(
'unikey' => $unikey,
'subject' => $subject,
'content' => $content,
'recipients' => json_encode(array(
array(
'account_id' => $to,
)
)),
'attachments' => $attachments,
'tag1' => 1,
'tag2' => 100,
'sendtime' => myself()->_getNowTime(),
'expiretime' => myself()->_getNowTime() + 3600 * 24 * 365 * 10,
'user_reg_start_time' => 0,
'user_reg_end_time' => myself()->_getNowTime() + 3600 * 24 * 365 * 10,
'createtime' => myself()->_getNowTime(),
'modifytime' => myself()->_getNowTime()
)
);
}
}