Help getting PHPMailer installed

Hi,
I want my webpage to have the ability to take uploads, basically students’ essays. I’ve been advised here that I could try PHPMailer. So I need to first get PHPMailer installed.

PHPMailer is available on Packagist (using semantic versioning), and installation via Composer is the recommended way to install PHPMailer. Just add this line to your composer.json file:

I’m not sure I have a composer.json file or what that is.

I’m thinking I first need to get composer. Where do I put it? On my home computer or on my webpage host?

This sounds maybe easier for me, but I think composer will also update PHPMailer:

Alternatively, if you’re not using Composer, copy the contents of the PHPMailer folder into one of the include_path directories specified in your PHP configuration and load each class file manually:

I could copy PHPMailer manually to a folder on the webpage host.

In that case, I need to know where my " PHP configuration" is. Where will I find that?

You can just install composer like it’s described in the “getting started” page on their website. The other step is to follow the command under “or run” on the packagist site.

1 Like

The thing is, I need PHPMailer on my web host, not on my laptop. So, if I install composer on my laptop, can it then upload to my web host?

As far as I know, I have no command line interface on my web host.

Why not? It’s just files on your hard drive.

Sponsor our Newsletter | Privacy Policy | Terms of Service