Category : phpmailer

My file .env MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=password MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME="${APP_NAME}" My function in Controller use AppMailTestMail; class CrmController extends Controller{ public function test(){ $data= [ ‘title’ => ‘Ttl Test’, ‘body’ => ‘Body Test’ ]; Mail::to("[email protected]")->send(new TestMail($data)); } } in TestMail I’ve two examples //1 return $this->from(’[email protected]’, env(‘MAIL_FROM_NAME’)) ->view(’emails.TestMail’) ->subject(‘test test test’) ->with($this->data); //2 return ..

Read more

Trying to redirect after complete sending emails to recipients. Making research bout set SMTPDebug = 0 might help but not working. Tried using header as well but still not working. function sendEmail(){ $mail = new PHPMailerPHPMailer(); // create a n $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->SMTPAuth = true; $mail->SMTPSecure = ‘ssl’; $mail->SMTPKeepAlive = true; $mail->Host = ..

Read more