GithubHelp home page GithubHelp logo

bnomei / kirby3-mailtester Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 53 KB

Kirby command for mail-tester.com

License: MIT License

PHP 100.00%
kirby3 kirby3-cms kirby3-plugin mail-tester spam spam-detection e-mail email test

kirby3-mailtester's Introduction

Kirby 3 mail-tester.com

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.

Commercial Usage


Support open source!

This plugin is free but if you use it in a commercial project please consider to sponsor me or make a donation.
If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?

Be kind. Share a little. Thanks.

โ€ Bruno
ย 
M O N E Y
Github sponsor Patreon Buy Me a Coffee Paypal dontation Hire me

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.

kirby3-mailtester's People

Contributors

bnomei avatar

Watchers

 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.