本文整理汇总了PHP中Mail::sendMailToStack方法的典型用法代码示例。如果您正苦于以下问题:PHP Mail::sendMailToStack方法的具体用法?PHP Mail::sendMailToStack怎么用?PHP Mail::sendMailToStack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mail
的用法示例。
在下文中一共展示了Mail::sendMailToStack方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendAdminNotice
public function sendAdminNotice(Vks $vks)
{
$vksArray = $vks->toArray();
$admins = User::whereIn('role', [ROLE_ADMIN, ROLE_ADMIN_MODERATOR])->get(['login', 'email']);
if (count($admins)) {
foreach ($admins as $admin) {
$message = App::$instance->twig->render('mails/v2/newVksAdminNotificate.twig', array('vks' => $vksArray, 'http_path' => HTTP_BASE_PATH, 'appHttpPath' => NODE_HTTP_PATH));
Mail::sendMailToStack($admin->email, "Новая заявка на ВКС #{$vks['id']}", $message);
App::$instance->log->logWrite(LOG_MAIL_SENDED, "Новая заявка на ВКС #{$vks['id']}");
}
}
}
示例2: schedule
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->call(function () {
$vksList = Vks::where('is_verified_by_user', 0)->with('owner', 'location')->get();
//
foreach ($vksList as $vks) {
if ($vks->is_verified_by_user == 0 && date_create($vks->start_date_time) > date_create($vks->update_at) && date_create($vks->start_date_time)->getTimestamp() - date_create($vks->update_at)->getTimestamp() <= 86400) {
$t = view('verificationMail', ['vks' => $vks]);
\Mail::sendMailToStack($vks->owner->login, "Просим подтвердить проведение ВКС #{$vks->id}", $t->render());
$vks->is_verified_by_user = USER_VERIFICATION_MAIL_SENDED;
$vks->save();
\App::$instance->log->logWrite(LOG_MAIL_SENDED, "Верификационное письмо по ВКС {$vks->id}, отправлено {$vks->owner->login}");
}
}
})->everyMinute()->sendOutputTo('verification_log.txt');
}
示例3: pullAndSendRequests
public function pullAndSendRequests()
{
$vc = new Vks_controller();
$requests = TechSupportRequest::where("status", TechSupportRequest::STATUS_READY_FOR_SEND)->with('attendance', 'owner')->get();
$temp_mails = 'Tomarov1-iv@mail.ca.sbrf.ru; DenisovDE@ab.srb.local';
if (count($requests)) {
foreach ($requests as $request) {
$vks = Vks::full()->find($request->vks_id);
$vc->humanize($vks);
$appHttpPath = NODE_HTTP_PATH;
$message = App::$instance->twig->render('mails/v2/tech_support/new.twig', compact('request', 'vks', 'appHttpPath'));
Mail::sendMailToStack($temp_mails, 'Запрос тех. поддержки для точки ' . $request->attendance->name . ' на ВКС #' . $vks->id, $message);
$request->status = TechSupportRequest::STATUS_DELIVERED;
$request->save();
}
}
}
示例4: function
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
$app->get('show', function () {
// $vksList = Vks::where('is_verified_by_user',0)->with('owner','location')->get();
//
// foreach ($vksList as $vks) {
// $t = view('verificationMail',['vks'=>$vks]);
// Mail::sendMailToStack($vks->owner->login, "Просим подтвердить проведение ВКС #{$vks->id}", $t->render());
// }
$vks = Vks::find(532);
if ($vks->is_verified_by_user == 0 && date_create($vks->start_date_time) > date_create($vks->update_at) && date_create($vks->start_date_time)->getTimestamp() - date_create($vks->update_at)->getTimestamp() <= 86400) {
$t = view('verificationMail', ['vks' => $vks]);
Mail::sendMailToStack($vks->owner->login, "Просим подтвердить проведение ВКС #{$vks->id}", $t->render());
$vks->is_verified_by_user = USER_VERIFICATION_MAIL_SENDED;
$vks->save();
App::$instance->log->logWrite(LOG_MAIL_SENDED, "Верификационное письмо по ВКС {$vks->id}, отправлено {$vks->owner->login}");
}
});
示例5: sendConfirmMail
public function sendConfirmMail($userId)
{
$user = User::find($userId);
if ($user) {
$message = App::$instance->twig->render('mails/v2/confirm-registration.twig', array('user' => $user->toArray(), 'http_path' => str_replace('index.php', '', NODE_HTTP_PATH), 'appHttpPath' => NODE_HTTP_PATH));
Mail::sendMailToStack($user->email, "Подтверждение регистрации", $message);
} else {
$this->error('no-object');
}
}