Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThinkPHP5.0.2手动安装提示找不到mailer\tp5\Mailer #4

Open
xiaoxinpro opened this issue Feb 1, 2017 · 2 comments
Open

ThinkPHP5.0.2手动安装提示找不到mailer\tp5\Mailer #4

xiaoxinpro opened this issue Feb 1, 2017 · 2 comments

Comments

@xiaoxinpro
Copy link

根据文档将 tp-mailer 和 swiftmailer 文件夹复制到 extend 目录中,目录结构如下:

extend
├── tp-mailer
│   └── src
├── swiftmailer
│   ├── lib
│   ├── doc
│   └── tests

在模型中引用
use mailer\tp5\Mailer;

在方法中调用

        $mailer = Mailer::instance();
        $ret['mailer'] = $mailer->from('***@***.***','***')
            ->to($strEmail)
            ->subject($subject)
            ->html($html)
            ->send();

报错如下:

Class 'mailer\tp5\Mailer' not found

报错位置:

$mailer = Mailer::instance();

求解决方案,谢谢!

@lihelin666
Copy link

我也遇到这个问题了!!怎么回事

@lihelin666
Copy link

我写成这样了 $mailer=\mailer\tp5\Mailer::instance();
还会提示:致命错误: Class 'mailer\tp5\Mailer' not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants