Download the PHP package beebmx/kirby-courier without Composer
On this page you can find all versions of the php package beebmx/kirby-courier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package kirby-courier
Kirby Courier
Kirby Courier
offers a convenient and painless solution for creating emails tailored for your Kirby
website.
With Kirby Courier
, you can streamline the process of email design and implementation for your site.
Overview
- 1. Installation
- 2. Usage
- 3. Snippets
- 4. Console
- 5. Helper
- 6. Options
- 7. License
- 8. Credits
Installation
Download
Download and copy this repository to /site/plugins/kirby-courier
.
Composer
Usage
Kirby Courier
comes with two email message
types, and you can customize them for your convenience.
Notification message
The Notification
message is the easiest way to send an email. You only need to use the Beebmx\KirbyCourier\Notification\Message
class
in your controller
or in your own implementation. Here's an example:
Formating notification messages
You have several methods to customize your Notification
message.
Here's an example with all the methods:
[!WARNING] You can only add one
action
perNotification
message.
Mail message
The Mail
message is the easiest way to send an email if you need to customize all the body of your email, you only need to use the Beebmx\KirbyCourier\Mail\Message
class
in your controller
or in your own implementation. Here's an example:
[!NOTE] It's important that you set a
template
to display your own customization. Every template should be located in yourcourier
directory.
Formating mail messages
To create your own template
for your mail
messages, you need to create a file in the default location for Kirby Courier
.
Here's an example for a marketing message:
[!NOTE] You can add content as
markdown
and it will be processed bykirbytext
.
Message methods
For both Mail messages, there are shared methods. Here's an example with all the methods:
If you want to previsualize your email, you can do it in any template. Here's an example:
[!NOTE] The
render
method doesn't trigger any email, and doesn't require any email settings likesubject
,from
orto
.
Snippets
For your convenience, Kirby Courier
has some snippets
to speed up your email building flow.
You can add them in your courier template
.
[!NOTE] You can create your own
snippets
if you want and apply it to thecourier/message
snippet. Just be sure to add it in theslot('body')
.
Button
Panel
Table
Subcopy
Console
If you are a Kirby CLI user, Kirby Courier
also has you covered.
The Kirby Courier
commands can help you create Mail
messages faster or even create your own Courier Theme
.
You can create your Mail
template with:
[!NOTE]
courier:make
is an alias ofmake:courier
Or may be you want to customize your messages with your own theme
with:
Helper
If dealing with namespaces
is hard, or you feel confused using the same Message
class name,
you can simplify it with the courier
helper:
For Notification
message you can use:
For Mail
message you can use:
And of course, you can use it in a template
to render it:
Options
Option | Default | Type | Description |
---|---|---|---|
beebmx.kirby-courier.logo | null | Closure ,string ,null |
Set your own logo in every message. |
beebmx.kirby-courier.path | courier | string |
Set a path where the templates and themes are located. |
beebmx.kirby-courier.from.address | 4 | int |
Set the default form.address for every message. |
beebmx.kirby-courier.from.name | 2 | int |
Set the default form.name for every message. |
beebmx.kirby-courier.message.greeting | Hello! | string |
Set the default message.greeting for every message. |
beebmx.kirby-courier.message.rights | All rights reserved. | string |
Set the default message.rights for every message. |
beebmx.kirby-courier.message.salutation | Regards | string |
Set the default message.salutation for every message. |
beebmx.kirby-courier.message.subject | Message from courier | string |
Set the default message.subject for every message. |
beebmx.kirby-courier.message.notify | string |
Set the default message.notify for every message. |
|
beebmx.kirby-courier.message.brand_name | null | ?string |
Set the default message.brand_name for every message. |
Here's an example of a full use of the options from the config.php
file:
License
Licensed under the MIT.
Credits
Kirby Courier
is inspired by the Laravel Notifications and Laravel Mail.
- Fernando Gutierrez @beebmx
- Jonas Ceja @jonatanjonas
logo
- All Contributors
All versions of kirby-courier with dependencies
getkirby/composer-installer Version ^1.0
tijsverkoyen/css-to-inline-styles Version ^2.0