定制 bnomei/kirby3-mailtester 二次开发

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

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

bnomei/kirby3-mailtester

最新稳定版本:1.1.1

Composer 安装命令:

composer require bnomei/kirby3-mailtester

包简介

Kirby 3 mail-tester.com

README 文档

README

Release Downloads Build Status Coverage Status Maintainability Twitter

Install

Using composer:

composer require getkirby/cli bnomei/kirby3-janitor bnomei/kirby3-mailtester

Since the Kirby CLI can only be installed with composer using gitsubmodules or installation from ZIP files is not recommended.

Usage

You need to forward the data you want to send (from, subject, body[text,html], transport?) to the command as JSON string. The example shows a $page->emailDataJSON()-method but that is something you need to implement yourself.

site/blueprints/default.yml

fields:
  mailtester_spam:
    type: janitor
    command: 'mailtester:spam --to MAILTESTER_USERNAME --data {( page.emailDataJSON )}'
    label: Test to current User
    icon: mailtester

Note: The command is using the Janitor-only delayed resolution of query language with {( query )} in its panel button for the data argument. The argument will not be resolved on every panel view but only when Janitor receives the api call after the button press.

When calling the command using PHP you need to provide the page argument yourself to allow the data arguments query to be resolved.

var_dump(
    janitor()->command(
        'mailtester:spam' .
        ' --to MAILTESTER_USERNAME' .
        ' --data {{ page.emailDataJSON }}' .
        ' --page ' . $page->uuid()
    )
);

Username (paid accounts)

You can set your paid mail-tester.com account to an environment variable and let it be loaded it with my dotenv plugin. Doing that you do not need to provide the --to argument in the command.

MAILTESTER_USERNAME=myusername

Dependencies

Disclaimer

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.

License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固