A
A
Andrew2019-02-28 15:50:02
Laravel
Andrew, 2019-02-28 15:50:02

How to send an email in Laravel without using a form?

Hello! I need to execute a cron command every 15 minutes and send the result to email. How can I do this (namely sending, not CRON)?
I tried this guide:
https://scotch.io/tutorials/ultimate-guide-on-send...
Since the check goes through Postman according to the guide, it returns the 419th error (session expired) to me. CRSF protection works, and I don't understand how I can start sending the letter then.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Arutyunov, 2019-02-28
@ellenripley4

Write a console command, call it from the console, and check it out. Inside the console command is the actual code for sending the letter.
https://laravel.com/docs/5.7/artisan#writing-commands

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question