- Install dependencies:
composer installin the root directory of the project. This command will install the necessary libraries for sending emails and managing environment variables. This command will install the necessary libraries for sending emails and managing environment variables. - Create a .env file: Copy the
.env.examplefile to.envand fill in your SMTP credentials. - Run the php server: cd into your project dir. Use the command
php -S localhost:8000to start a local PHP server. - Visit localhost:8000/test-form.html in your browser: This will open the test form where you can enter your email address.
- Check your email: After running the script, check your inbox for the test email.