Code Monkey home page Code Monkey logo

mss's Introduction

#邮件&短信服务功能说明 本系统是基于workerman3.0版本实现,workerman官方网站:http://www.workerman.net/ #启动服务 php start.php start //debug启动

php start.php start -d //release启动

#停止服务 php start.php stop

##邮件服务: 邮件功能通过phpmailer实现,流程为先向redis写入数据,然后多进程异步从redis读取数据进行发送,发送结果写入数据库。

多进程配置项和启动文件:Applications\Email\start.php

redis数据结构: $data = json_encode(array('sender' => $sender, 'subject' => $subject, 'content' => $content, 'to_email' => $to_email, 'stringattachment' => $stringattachment, 'stringembeddedimage' => $stringembeddedimage, 'to_name' => $to_name, 'platform_id' => $platform_id));

参数说明: $sender 发送者名称

$subject 邮件标题

$content 邮件正文

$to_email 收件人邮箱

$stringattachment 附件

$stringembeddedimage 可以显示在正文的附件,例如图片

$to_name 接收者名称

$platform_id 平台id

在Applications\Email目录下通过php start.php start -d单独启动邮件服务

##短信服务: 短信功能通过云片网api接口实现,流程为先向redis写入数据,然后多进程异步从redis读取数据进行发送,发送结果写入数据库。

多进程配置项和启动文件:Applications\Sms\start.php

redis数据结构:

$data = json_encode(array('mobile' => $mobile, 'text' => $text, 'sender' => $sender, 'platform_id' => $platform_id));

参数说明: $sender 发送者名称

$mobile 接收者手机号

$text 短信内容

$platform_id 平台id

在Applications\Email目录下通过php start.php start -d单独启动邮件服务

注意:云片网的短信功能需要到官网申请apikey,短信内容也要按照规定的模板进行填写。云片网官网:http://www.yunpian.com/

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.