Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Part 40 - Sending Email from Contact Form [How to Build a Blog with Laravel 5 Series]

  • DevMarketer
  • 2016-07-14
  • 63091
Part 40 - Sending Email from Contact Form [How to Build a Blog with Laravel 5 Series]
LaravelPHPTutorialCodeDeveloperDevelopmentEmail
  • ok logo

Скачать Part 40 - Sending Email from Contact Form [How to Build a Blog with Laravel 5 Series] бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Part 40 - Sending Email from Contact Form [How to Build a Blog with Laravel 5 Series] или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Part 40 - Sending Email from Contact Form [How to Build a Blog with Laravel 5 Series] бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Part 40 - Sending Email from Contact Form [How to Build a Blog with Laravel 5 Series]

In Laravel 5.2 and 5.3, sending emails is really simple using the built in Mail facade. This tutorial will cover how to make a contact form work by sending an email after a user fills out a contact form on our Laravel PHP website.

We made a contact form a while back but never connected it to work and actually send mail. Today we will connect it and also learn how to use the basic mail facade in Laravel.

First thing we need to do is set up the email settings so that Laravel knows how to send the email. In this tutorial series we are focusing on sending email via the SMTP protocol. This is supported by literally any email provider and is universally coded in Laravel. You simply need the SMTP host address, the port number, SMTP username, and the SMTP password. You can add all of this information into our .env file and Laravel will understand what to do with it.

Throughout this tutorial I am using a platform called Mailtrap.io. This service is designed for developers to test email sending in application local testing. It basically catches all outgoing email and puts it into a mail client we can view in the browser. It lets us test emails without them going to real users. This service is really great for testing, but doesn't send real email. If you want to send real email you need to connect the SMTP settings to either your real email account like through gmail, yahoo, etc. or by signing up for a transactional email service and getting SMTP settings from them. Examples of these services include Amazon SES, MailJet, SendInBlue, SendGrid, Mailgun, and more. These services all offer a few thousand emails free every month to get you started.

Once we have the settings in place, we need to set the routes up. Make sure we have a route for our contact form that is both for a GET request and for a POST request. We will use the GET request to display the contact form to the user, and the POST request version will create and send the email and then redirect the user to the home screen with a success message.

Once we have the routes set up, we can head over to laravel and open the PagesController. This is where we put our functions to manage our contact form and send mail with.

The getContact function is simple. It just returns our view that contains the contact form.

Things get trickier with our postContact function which must process the form.

1) We validate the data from the form
2) We create a $data array with keys that we want to pass into the view
3) We use our Mail::send() function to actually send the email
4) Create our flash message using Session
5) Redirect users to the homepage

Coming Up:
Starting our comments system

-- DOWNLOAD/ VIEW SOURCE CODE --

https://github.com/jacurtis/laravel-b...


-- LINKS --

Laravel Mail Documentation:
https://laravel.com/docs/5.2/mail

Laravel Validation Rules:
https://laravel.com/docs/5.2/validati...


-- MORE FROM THIS SERIES --

Previous Video [Part 39]:    • Part 39 - Deleting Tags Safely [How to Bui...  
Next video [Part 41]: Coming Soon

Full Playlist for the "How to Build a Blog with Laravel" Series:    • How to Build a Blog with Laravel  


— DEVMARKETER INSIDER (Email List) —

Subscribe to DevMarketer Insider - A weekly (once a week) email newsletter to fans that want to know everything that is happening with DevMarketer, including announcements and articles not published on this channel. No spam ever, I promise, unsubscribe anytime.
https://confirmsubscription.com/h/d/5...

-- FOLLOW ME --

Subscribe for New Releases!

Twitter -   / _jacurtis  
(ask me questions!)

-- QUESTIONS? --

Leave a comment below and I or someone else can help you.
For quick questions you may also want to ask me on Twitter, I respond almost immediately.

Email me [email protected]

Thanks for all your support!

---

Tags: Laravel 5.2 Framework Tutorial Easy to learn. Best tut about Laravel. Build a blog with Laravel Tutorial. Beginner tutorial. How to video. PHP framework easy best tutorial. Laravel 5 coding in PHP with Alex. Contact form using Laravel Mail::send function facade. SMTP mail sending in Laravel. Best tutorial mail in Laravel. Mailtrap Amazon SES, SendGrid, MailJet in Laravel.

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]