asdasdasdasdasdasdasdasd
@csrf
public function sendBulkEmail(Request $request){
try {
$recipients = explode(',', $request->recipient);
$mail = new PHPMailer(true);
//Server settings
$mail->setFrom('[email protected]', 'Sender');
foreach ($recipients as $recipient) {
$mail->addAddress($recipient);
}
$mail->addReplyTo('[email protected]', 'Information');
$mail->isHTML(true);
$mail->Subject = 'Request';
$mail->Body = 'this test message';
}