Skip to content
Snippets Groups Projects
Commit 7b6dc28b authored by Muneeb Mukhtar's avatar Muneeb Mukhtar Committed by Ivan Doroshenko
Browse files

Issue #3322991 by o_tymoshchuk, MukhtarM, Abyss, Matroskeen, Arturo1007: Fix...

Issue #3322991 by o_tymoshchuk, MukhtarM, Abyss, Matroskeen, Arturo1007: Fix coding standards messages
parent 4f8db568
No related branches found
No related tags found
1 merge request!14fix coding standards
......@@ -23,22 +23,25 @@ CONFIGURATION
3. Go to the Unione settings page (/admin/config/services/unione)
and enter your API key into the corresponding field.
4. Select your UniOne instance (**it should match the server where account was registered**).
4. Select your UniOne instance (**it should match the server where account
was registered**).
5. Advanced settings:
- Use inline attachments - allows to send inline attachments in body html. [More](https://docs.unione.io/en/web-api-ref#email-send)
- Tracking settings - allows to enable clicks and reads tracking. [More](https://docs.unione.io/en/web-api-ref#email-send)
- Enable Debug Mode - Includes recording logs about sending messages to Drupal Reports.
- Enable Debug Mode - Includes recording logs about sending messages to
Drupal Reports.
6. Go to the Drupal Mail System config /admin/config/system/mailsystem and in field **Sender** check UniOne mailer.
6. Go to the Drupal Mail System config /admin/config/system/mailsystem and
in field **Sender** check UniOne mailer.
FOR DEVELOPERS
-------------
### Custom parameters
Unione plugin accepts some parameters, that will be processed and sent with the message.
You can find some examples below.
Unione plugin accepts some parameters, that will be processed and sent
with the message. You can find some examples below.
```php
/**
......@@ -46,8 +49,9 @@ You can find some examples below.
*/
function your_module_mail($key, &$message, $params) {
// If "Use inline attachments" checkbox is enabled in module configuration,
// the plugin will try to convert body images into inline attachments automatically.
// However, it's also possible to prepare the list of attachments manually.
// the plugin will try to convert body images into inline attachments
// automatically. However, it's also possible to prepare the list of
// attachments manually.
$message['params']['inline_attachments'] = [
[
"type" => "image/gif",
......@@ -57,17 +61,19 @@ function your_module_mail($key, &$message, $params) {
];
// This is how to apply Unione template to the email.
// A list of available templates is available on Unione > Templates admin page.
// A list of available templates is available on Unione > Templates
// admin page.
$message['params']['template_id'] = 'Template id';
// If template is set, Unione will use template values (subject, body, etc.) only if
// they're not available in the email request data.
// If you want to apply template fields, you can set the list in "template_fields"
// If template is set, Unione will use template values (subject, body, etc.)
// only if they're not available in the email request data. If you want
// to apply template fields, you can set the list in "template_fields"
// parameter. If "template_fields" are not set, "body" value is applied.
$message['params']['template_fields'] = ['body', 'from_email', 'from_name', 'subject'];
$message['params']['template_fields'] = ['body', 'from_email',
'from_name', 'subject'];
// By default, Unione plugin prepares a list of recipients based on default "to"
// parameter. If you need to pass recipients with substitutions and (or) metadata, you
// can use "recipients" params key.
// By default, Unione plugin prepares a list of recipients based on default
// "to" parameter. If you need to pass recipients with substitutions and
// (or) metadata, you can use "recipients" params key.
$message['params']['recipients'] = [
[
"email" => "user@example.com",
......
.unione-template-item table.nl-container {
border: none;
}
.unione-template-item table.nl-container:focus {
outline: none;
}
......@@ -13,10 +16,15 @@
.unione-template-item table.nl-container tr,
.unione-template-item table.nl-container td {
border: none;
outline: none;
margin: 0;
}
.unione-template-item table.nl-container tbody:focus,
.unione-template-item table.nl-container tr:focus,
.unione-template-item table.nl-container td:focus {
outline: none;
}
.unione-template-item table.nl-container * {
pointer-events: none;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment