Giter Site home page Giter Site logo

panelemail's Introduction

panelemail

SSPanel notification email (PUSH)

前言

有时候需要给用户发送一些通知,节点维护啊,节点调整啊,促销活动啊等等。我看好多飞机场都是直接拿每日用量的邮件模板配合网站最新公告,然后来一条php命令实现,太没有技术含量了有木有。 本文教你如何优雅的实现 🙂

步骤

ExtMail.php上传至 src/Command/ 覆盖源文件

请将 '全体通知内容' 修改为你想要通知的内容

message2.tpl上传至 resources/email/ext/

然后就是给user表新增一个字段了,登陆phpmyadmin,选中sspanel,user


名字填email_Notification,默认选定义,然后填入0,最后点击保存


然后把自己的email_Notification值改成1。用搜索,email一栏填写你的管理员账户邮箱,然后点击执行

选中,编辑

改成1,点执行

至此,基本功能已经实现了,ssh连接到服务器,进入网站根目录,php xcat ExtMail sendAdminMessage 一下看看效果

使用

php xcat ExtMail sendUserMessage ,给用户发送通知
php xcat ExtMail sendAdminMessage ,给管理员发送通知,用于测试发送效果

Reference: https://sspanel3.org/send-all-user-notices/

panelemail's People

Contributors

stardock avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.