Did you like how we did? Rate your experience!

Rated 4.5 out of 5 stars by our customers 561

Video instructions and help with filling out and completing Form 2220 Email

Instructions and Help about Form 2220 Email

Hey guys and welcome back to another episode from the dev marketer channel this is the series on how to build a blog with level we start from absolute beginner work our way up to a pretty intermediate level blogging application alright so we've worked on tons of stuff up to this point we just finished finished the tags crud and I promised that we would then start our commenting system but I was reminded this morning that I promised another item before we finish the series and that was a working contact form I thought I would go ahead and slip it in now just to kind of break up the crud the crud stuff since we just did a crud we did with that with tags now we're gonna do it again with comments I thought hey it'd be kind of cool to do a contact form so let's go ahead we're going to create a working contact form we're going to explore the mail method the mail class that came with label and see how it works and go ahead and send an email you alright so the male class of level is built off of the PHP library called Swift mailer okay very very popular library very very powerful library as well lets us do lots of different things and so that's what this is built off of and swift mailer comes installed with label when you run a new label application it you know it just pre installs this Swift mailer and then the mailer is a class that level has that's built on top of the Swift mailer library alright so it allows us to do some pretty advanced stuff working with emails in labels actually really simple we can actually create views for our emails using you know blade views and we can do inline attachments we can do it makes everything just so easy to actually take all the headache away from mail alright so before we get started on this tutorial what I need you guys to do is we're actually going to need to work on the the config file so that we can actually send mail now if you remember this it can be basically the same thing as in the previous video we did about mail when we were working with authentication and we set up the password resets it were basically the exact same thing here we're going to focus on sending mail via the SMTP protocol and that's going to be the way we do it in this series now as you start working with all sorts of email providers you're going to find that there's two ways to send email there's the SMTP protocol and there's the API you know all these services have their own API so if you're building a you know a production level app you've got hundreds of thousands of users every day sending emails you might you probably want to look into sending via the API that's going to be the more reliable way to send it and stuff like that it also gives you access to new features that certain transactional email providers have and so on you're probably gonna want to look into the API level supports lot of those api's out of the box however because this is just a contact form and because this is the basic tutorial on label we're just going to focus on SMTP but we will be hitting up how to use send me email via the API in our next series which is building an e-commerce website with label that's going to go into advanced and intermediate level techniques and we're going to go over the API in that series okay now for now remember using the SMTP you need to go to whoever you're going to be running your email through get your SMTP credentials and I'll show you where to install them now in production you're going to want to install them under config and mail dot PHP from here you'll obviously since we're sending his SMTP we just keep the driver as SMTP and then you're going to change your host URL your port you probably are your default email address and then you're going to change the username and the password all right now because we're sending from local and from from local test development we actually have a env file here and you can see it's set to local and we have different credentials that overwrite that config file okay if you put something in this dot env file it will override the config file so this allows us to have an environment file where we can say while we're in local go ahead and run smtp we're going to be using male trapped io which we talked about in the other video so if you want to go look at that you can do that and then we've got all the ports and username and password setup now I'm let me double check this because I think I reset my username and password so these probably aren't updated so I'm going to head on over to Mel trapped I owe you guys can see this here and I'm a login what's weird did I look I might have logged in with my github account oh here it is okay perfect so I've got my demo inbox and it looks like see my username it actually might be the same oh it's the same okay perfect okay so I'm going to go ahead I'm going to be keeping this um I got my username it tells you up here your username and your password and then your port which is due we're going to be using 25 so this is the SMTP credentials now you can get you can put your Gmail ones in I talked about that in the other video if you want.

If you believe that this page should be taken down, please follow our DMCA take down process here.