Install PEAR Mail on Windows Server 2008R IIS7 PHP

This article assumes that you already have PHP installed and working and your PHP location is C:\PHP

  • Download go-pear.phar file from https://pear.php.net/go-pear.phar and save it as C:\PHP\PEAR\go-pear.phar 
  • Open command prompt, navigate (cd) to C:\PHP\PEAR and run: php go-pear.phar
  • Accept all installation defaults:
    1. Install Type: System-Wide
    2. Default paths: Yes (double check that path to your PHP install is correct)
    3. Update php.ini: Yes

  • Add ;C:\PHP\PEAR to Windows Environment PATH Variable: Control Panel > System > Advanced System Settings > Environment Variables > System Variables > Path

  • Make sure PEAR is working from the command prompt: pear version should return something like this:
  • Install PEAR Mail and Net_SMTP packages by running following commands:
    • pear install Mail
    • pear install Net_SMTP
  • If you intend to use SSL/TLS enabled SMTP servers, enable openssl PHP extension:
    • Open php.ini and uncomment following line: extension=php_openssl.dll
    • Restart IIS: open command prompt and run iisreset

 

May 2017
Windows Server 2008R
Internet Information Services 7 (IIS7)
PHP 7.1.5
PEAR 1.10.4

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait