Hello, in this video, I am going to show you how to set up a PHP mailer. First thing we'll do is literally Google PHP mailer, go to the GitHub link provided link to this anyway, so you don't have to Google yourself. But you can if you want to go to releases, go to the latest version, download the source code, I want you to cancel it somewhere, go download the thoughts more, and go right here. So if I just double click one of them, get rid of the other one. And the only thing that we're interested in is the source folder, the file files. Yeah, so you want to put this, you know, in the same folder, where your website is.
So if I go to my ID, and you can see we've got exception or PHP mailer, pop free and SMTP right there, you can organize the a bit more and put it into some sort of PHP mail folder, email folder, anything like the libraries folder, it's totally up to you. Obviously, just change the path. We set for the require command in a second accordingly. Okay, so to actually set it up, let's do use PHP mailer for this is just, you know, for the namespace, PHP, mailer, backslash, PHP, mailer and the normal one want and this is the exception just in case there is we obviously ideally want no errors, but just in case. So first of all we need to require the exception class. And for this we are going to put it is just called the exception of PHP here is where you wouldn't modify.
So if it was in a PHP mailer, for example, you put something like that, and I recommend adding an extra task for you to essentially, you know, organize it a bit better, and we need free requires the other two is PHP mailer. Then we are going to have SMTP and now to make sure But it's also fair to create a variable called Gmail and new PHP mailer. To true and if this loads, fine, we get no errors, then that means PHP mailer has been successfully set up. So that's all I wanted to, you know cover in this video. In a separate video I'll cover actually how to send email using PHP mailer. So that's it.
Any questions, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.