|
Managing the Code: External Libraries
LAB: Downloading an External Library
What is the purpose of this lab?
- PHPMailer vastly expands the capabilities of the PHP "mail()" function
- PHPMailer will be used in another lab (see the chapter on email)
- In this lab you will download and install PHPMailer
- Following the installation you will run a sample code file as a test
Reviewing PHPMailer Documentation ...
- Go to the website "https://github.com/Synchro/PHPMailer"
- Scroll down the page
- Review the installation procedure
Downloading and installing PHPMailer ...
- From the PHPMailer website click "ZIP"
- Open up the ZIP file
- Extract the "PHPMailer-master" folder to /path/to/xampp/php/pear
- Change the folder name to "PHPMailer"
Quick Test ...
- Under "htdocs/sweetscomplete" create a folder "mailtest"
- From the WorkingFiles folder for this chapter, copy these files into "mailtest":
external_lab_test.php, contents.html, phpmailer*.gif - In your editor open the file sweetscomplete/mailtest/external_lab_test.php
- Change "$address" to your email address
- From your browser run "http://localhost/sweetscomplete/mailtest/external_lab_test.php"
- If your computer is configured to send mail, you should see the message appear in your inbox
- Otherwise, look in the /path/to/xampp/mailoutput folder for a text file of the message
|
|