Swift Mailer - Can't send mail, and can't find error logs

前端 未结 3 1021
后悔当初
后悔当初 2020-12-16 18:57

New to PHP and Swiftmailer and have yet to get it working. I\'ve uploaded the /lib/ directory to a directory in the root of my shared webserver from Hostgator. I\'ve uploade

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 19:38

    Use transport exception handling like so:

        try {
            $mailer->send($message);
        }
        catch (\Swift_TransportException $e) {
            echo $e->getMessage();
        }
    

提交回复
热议问题