/** * 运行 CLI 应用程序。 */ function start() { $option = new HTTPOption(); // $option->setEncodeCookies(true); // $option->setCookies($this->cookies); $option->setAcceptMimeType('text/html'); $http = HTTP::instance($this->ctx); $a = $http->downloadString('http://www.9abbs.com/forum.php?mod=viewthread&tid=471406&extra=page%3D1%26filter%3Dtypeid%26typeid%3D31%26typeid%3D31', $option); // try { // $obj = new PHPMailer(); // // $obj->SMTPDebug = 0; // $obj->isSMTP(); // $obj->setFrom('*****@*****.**', '小石头'); // $obj->addAddress('*****@*****.**', '李磊'); // $obj->SMTPAuth = true; // $obj->Host = 'smtp.126.com'; // $obj->Port = 25; // $obj->Username = '******'; // $obj->Password = '******'; // $obj->Subject = 'SMTP 测试邮件!'; // $obj->Body = '来自 PHPMailer 的测试邮件!'; // $obj->CharSet = 'UTF-8'; // // if ($obj->send()) // Console::info('发送成功!'); // else // Console::error('发送失败!'); // } catch (Exception $ex) { // Console::error($ex->getMessage() . PHP_EOL . $ex->getTraceAsString()); // } }