Send email with PHP | Create a Working Contact Form Using PHP

preview_player
Показать описание
Please consider supporting my channel:

Learn how to send an email using PHP.

Recommended hosting:

Full PHP course:

In this video you'll learn how to:
• create a contact form in HTML, including client-side validation
• install and configure the PHPMailer package
• send email using PHPMailer
• debug problems when sending the email
• use the post / redirect / get pattern

Code shown in the video:

Using Gmail's SMTP server:

PHPMailer:

PHPMailer documentation:

CSS:

00:00 Introduction
00:19 Create contact form
01:32 Style the form
02:06 Create PHP script
02:52 Get SMTP server
03:37 Sending email from PHP
04:01 Install PHPMailer
04:12 Use PHPMailer
06:57 Debugging
08:31 POST / redirect / GET
09:50 Summary

#PHP #PHPMailer #SMTP #email
Рекомендации по теме
Комментарии
Автор

What other related topics would you like to see a video on?

dave-hollingworth
Автор

I only found this channel earlier today, but I love your delivery. Really easy to understand. I will have been coding for exactly one year tomorrow and I've just finished building my first full-stack project using JavaScript and PHP. Hope you produce more PHP videos for this channel. Thanks for sharing, Dave, subscribed!

StevieB
Автор

Is actually really frustrating that no one wants to do a tutorial a tutorial for a working email form that has the proper security features that are required by web host. That's mainly the whole reason why you would incorporate PHP into the email.

getoverhere
Автор

Thanks Dave. You're still helping people.

tlb
Автор

I never knew you could use an smtp with php…Thank you

sampsonchinonso
Автор

I was struggling to send an email through php thanks Dave Hollingworth sir for the usefull video.💌

Shashidhara_S_C
Автор

I had never heard of classless css
this is lifechanging😭😭

AnnabethChase-zpep
Автор

Thank you so much for this video! I have been so stressed trying to do this for so long

miaenderby
Автор

Great, Dave. This is helpful and very useful for me. Thanks for your efforts.

alan-overthenet
Автор

Hi Dave! Finishing up the second Udemy MVC course man what a blessing. Gonna use this email technique with it. You taught us a lot of what I learned in college about Java in those two courses. Extremely valuable resource for up and coming developers. I am going to build a couple more frameworks using some textbooks I found and implement the best from all of them. Your framework is the baseline the router is awesome thank you! It acts like a sort of white list or catalog of pages a user can access on your site. Very cool piece of the puzzle as far as organization and access control.

davidh
Автор

Great channel, easy to understand and very complete, subscribed already.

Alejandro
Автор

Great video, congrats!

I'm new here, and I will check out other videos on the channel.

Two topics that interest me would be a video about superglobal variables in PHP and how to implement a "shopping cart" on PHP and MySQL.

marcoaureliodemesquita
Автор

Hi Dave, thank you so much for the video. It really helped me to solve a small task very quickly! THANKS!!!!

DocRamadani
Автор

Nice job of explaining this so it makes sense! Only I want to send through my own webhost mail server, so need to find out how to do that, but Thank you, as I understand more now then I did before watching this!

ldeutscher
Автор

thanks that is awesome straight forward tutorial

ReynaldoUbas
Автор

Finally, I got phpmailer in and working. It was done all with your help and thank you. Question: How can I send two different messages to two emails address?

dannyreg
Автор

omg it worked! :D
Es difícil encontrar tutoriales de esto en español ;-;

Ritzel
Автор

ok, if composer was unable to install PHPMailer correctly by running:
C:\xampp\htdocs>composer require PHPMailer/PHPMailer and I DON'T have the autoload.php file that comes with installing using composer, how does this affect the .php file that contains the instructions for sending the email using SMTP? I was able to download the zip file from the PHPMailer github post and move the PHPMailer pkg to the htdocs/vendor/phpmailer folder however

GMCC
Автор

So doggone helpful... clear and consise. Thank you Dave.

conradjelinger
Автор

Great explaination, it also worked with my contactform.
But how do i upload this to my online host to use from every mobile device for

Skankhunt-cfuh
welcome to shbcf.ru