How to use PHPMailer without composer?

前端 未结 2 633
清酒与你
清酒与你 2021-02-05 20:25

I\'d like to use the latest PHPMailer library with require_once() instead of messing around with Composer. I\'d like a pure xcopy deployment with minimal fuss.

2条回答
  •  孤独总比滥情好
    2021-02-05 20:56

    This worked for me, I also downloaded phpmailer from this address

    https://sourceforge.net/projects/phpmailer/

    use PHPMailer\PHPMailer\PHPMailer;
    use PHPMailer\PHPMailer\Exception;
    use PHPMailer\PHPMailer\SMTP;
    
    require '/source/PHPMailer2/src/Exception.php';
    require '/source/PHPMailer2/src/PHPMailer.php';
    require '/source/PHPMailer2/src/SMTP.php';
    

提交回复
热议问题