Code Monkey home page Code Monkey logo

commenttomail's Introduction

Hi there 👋

I'm xcsoft, A Full Stack Developer. I have development experience in back-end, web, Flutter mobile software, WeChat applet, etc.

commenttomail's People

Contributors

soxft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

commenttomail's Issues

报错

如下错误是需要使用PHP8.0么,因为现在是PHP7.2。如果是PHP7.2,应该如何修改,谢谢

syntax error, unexpected 'Db' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

不支持STARTTLS

插件不支持STARTTLS协议,也就无法支持到Outlook邮箱

Error: Undefined constant "TypechoPlugin\CommentToMail\GLOB_BRACE" in /app/usr/plugins/CommentToMail/Console.php:49

安装,启用,配置都没有问题,但是一评论就报错。

在评论邮件提醒中看到了这个报错。

Error: Undefined constant "TypechoPlugin\CommentToMail\GLOB_BRACE" in /app/usr/plugins/CommentToMail/Console.php:49
Stack trace:
#0 /app/var/Typecho/Widget.php(155): TypechoPlugin\CommentToMail\Console->execute()
#1 /app/usr/plugins/CommentToMail/page/console.php(54): Typecho\Widget::widget('TypechoPlugin\C...')
#2 /app/admin/extending.php(14): require_once('/app/usr/plugin...')
#3 {main}

在StackOverflow中看到了解释,我用的是dockers alpine镜像导致了报错。

https://stackoverflow.com/questions/48377176/notice-use-of-undefined-constant-glob-brace

发送邮件时报错

具体报错:syntax error, unexpected '|', expecting ';' or '{'
具体环境:php7.4、Typecho1.2

评论之后没有邮件

最外部的系统是Ubuntu 20.04
里面装了docker,使用的joyqi/typecho:1.2.0-php8.0-fpm-alpine镜像。

安装之后一开始报错,发现是PHP8.0的问题,然后自己手动改了代码:
之前 $files = glob($this->_template_dir . '.{html,HTML}', GLOB_BRACE);
之后 $files = glob($this->_template_dir . '
.html');

后来发现还是不能用,于是自己手动添加了postgres的一个文件内容如下:

CREATE TABLE IF NOT EXISTS typecho_mail (
id SERIAL PRIMARY KEY,
content text NOT NULL,
sent int DEFAULT 0
);

然后没有出现任何报错了,同时测试邮件可以发出去,但是评论之后没有邮件。

我用输出log的方式调试了一下,发现Plugin.php里面的函数都可以正常执行,但是Action.php中的函数没有一个得到了执行。看typecho的官方文档也没有提到Action的作用,我也不明白这个文件中的函数是怎么被调用的,所以过来求助。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.