29 lines
492 B
PHP
29 lines
492 B
PHP
<?php
|
|
/**
|
|
* @label Send Email
|
|
* @description Send email to all users
|
|
*/
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Support\Facades\Mail;
|
|
|
|
set_transanctional_email_settings();
|
|
|
|
$users = User::whereEmail('andras.bacsai@gmail.com');
|
|
foreach ($users as $user) {
|
|
Mail::send([], [], function ($message) use ($user) {
|
|
$message
|
|
->to($user->email)
|
|
->subject("Testing")
|
|
->text(
|
|
<<<EOF
|
|
Hello,
|
|
|
|
Welcome to Coolify Cloud.
|
|
Here is your user id: $user->id
|
|
|
|
EOF
|
|
);
|
|
});
|
|
}
|