定制 as-milano/wn-mailtelegram-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

as-milano/wn-mailtelegram-plugin

Composer 安装命令:

composer require as-milano/wn-mailtelegram-plugin

包简介

Plugin, allows to receive site emails in your Telegram account via bot.

README 文档

README

Mail Telegram plugin allows to receive site mail to your telegram account via bot. You can log all email sent on the website or configure this plugin to receive only notification emails for particular administrator(s). See the documentation for configuration details.

Installation

Composer

Use Composer to add plugin to your project:

composer require as-milano/wn-mail-telegram-plugin

Documentation

Full documentation about telegram bots, you can see here: https://core.telegram.org/bots/api

Get bot token

Create bot by @BotFather. Bot token will look like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

Get user chat id

For getting user chat id - write any message to bot or just click Start. Then you can go to Mail Telegram settings and in Receivers tab you'll see your telegram user ID. Second way you can get your user's ID - open the following url in your browser:

https://api.telegram.org/bot{{token}}/getUpdates

Don't forget to replace {{token}} with your bot token.

Enter this token and chat id into plugin settings. That is all, have a nice experience with this plugin!

Other settings

Disabled in debug

You can disable telegram notifications in debug mode.

Disabled sending mail to Telegram

You can disable telegram notifications at all.

Admins to send mail

If you check admin1 - only those mail that has "To" parameter set to admin1's e-mail will be sent to the Telegram chat.

Formatting tab

Strip ends of lines

Make notification mail text compact by stripping ends of lines. That will transform the mail text into one paragraph.

Send messages to several bots.

In your plugin you can create your own Telegram objects with other telegram tokens. Then use the logic from classes/Helper class - send method. Just copy the code, ajust it and send messages your way.

$telegram = (new Telegram(['telegram_token' => $sToken]));

License

Originally developed by Art Gek.

Inspired by Exception Report to Telegram by Alexander Shapoval

统计信息

  • 总下载量: 41
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固