Main reference: https://pepipost.com/tutorials/send-an-email-via-gmail-smtp-server-using-php/
1. 先下載PHPMailer: https://github.com/PHPMailer/PHPMailer/archive/master.zip
2. 用composer install phpmailer/phpmailer
--> 遇到錯誤1
錯誤1:
E: Unable to locate package composer
分析: 未安裝composer
錯誤1解決:
sudo apt-get update
sudo apt-get install curl php5-cli git
curl -sS https://getcomposer.org/installer | sudo php -- --install- dir=/usr/local/bin --filename=composer
No comments:
Post a Comment