Skip to content

Commit

Permalink
initial port to Backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
herbdool committed Aug 1, 2018
1 parent 06c4bc0 commit f61b021
Show file tree
Hide file tree
Showing 15 changed files with 341 additions and 306 deletions.
81 changes: 81 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
Maillog
-------
The Maillog module provides a method of keeping archival copies of all emails
sent through the site. It can also, optionally, display a copy of the email
using the Devel module, if present.

Features
--------------------------------------------------------------------------------
* All emails being sent by the site may have a copy stored in the database for
later review.

* All email delivery may be halted, preventing a site from sending out emails
in situations where that might not be needed, e.g. for a local development
copy of the site.

* If the Devel module https://www.backdropcms.org/project/devel is installed, emails
can also be displayed on the page as they are being sent.

* If the MailSystem module https://www.backdropcms.org/project/mailsystem is
installed it is possible to control which of the installed email modules will
be used to send messages from Maillog's settings page, mirroring MailSystem's
functionality.

Configuration
--------------------------------------------------------------------------------
1. On the User Accounts Permissions administration page ("Administer >> Configure
>> People >> Permissions") there are three permissions to control:
- The "Administer Maillog" permission allows users to access the settings
page to control the module's options.

- The "View Maillog" permission allows users to access the Maillog list page
at admin/reports/maillog.

- The "Delete Entries from the log" permission allows users to delete items
from the log page.

2. The main administrative page controls the module's settings page:
admin/config/development/maillog


Troubleshooting / known issues
--------------------------------------------------------------------------------
If the email is not being logged then the site's default email system is not
configured correctly. It is recommended to use the MailSystem module
https://www.backdropcms.org/project/mailsystem to help with this. Alternatively, edit
the system.mail.json file in your active config folder:

```
"default-system": "MaillogMailSystem",
```

Related modules
--------------------------------------------------------------------------------
Some similar modules that are available include:

* Reroute Email
Reroutes outbound emails to a specific destination address.
http://backdropcms.org/project/reroute_email

License
-------

This project is GPL v2 software. See the LICENSE.txt file in this directory for
complete text.


Current Maintainers
-------------------

- Seeking maintainers.

Credits
-------

- Ported to Backdrop CMS by herbdool (https://github.com/herbdool).

This module is a port of the SMTP module for Drupal which was written and maintained by a large number of contributors, including:

Maintained by Miro Dietiker https://www.drupal.org/u/miro_dietiker, Sascha Grossenbacher https://www.drupal.org/u/berdir and Damien McKenna
https://www.drupal.org/u/damiemckenna.
90 changes: 0 additions & 90 deletions README.txt

This file was deleted.

7 changes: 7 additions & 0 deletions config/maillog.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"_config_name": "maillog.settings",
"maillog_send": 1,
"maillog_log": 1,
"maillog_devel": 1,
"maillog_engine": "DefaultMailSystem"
}
143 changes: 143 additions & 0 deletions config/views.view.maillog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"_config_name": "views.view.maillog",
"name": "maillog",
"description": "Displays the list of e-mails logged by the 'Mail Log' module.",
"module": "maillog",
"storage": 4,
"tag": "",
"disabled": false,
"base_table": "maillog",
"human_name": "Mail Log Report",
"core": "1.0",
"display": {
"default": {
"display_title": "Defaults",
"display_plugin": "default",
"display_options": {
"query": {
"type": "views_query",
"options": []
},
"title": "Maillog",
"use_more_always": false,
"access": {
"type": "perm",
"perm": "view maillog"
},
"cache": {
"type": "none"
},
"exposed_form": {
"type": "basic"
},
"pager": {
"type": "none"
},
"style_plugin": "table",
"empty": {
"area_text_custom": {
"id": "area_text_custom",
"table": "views",
"field": "area_text_custom",
"label": "Maillog",
"empty": true,
"content": "Maillog is currently empty. Send a mail!"
}
},
"fields": {
"idmaillog": {
"id": "idmaillog",
"table": "maillog",
"field": "idmaillog",
"exclude": true
},
"sent_date": {
"id": "sent_date",
"table": "maillog",
"field": "sent_date"
},
"header_message_id": {
"id": "header_message_id",
"table": "maillog",
"field": "header_message_id"
},
"subject": {
"id": "subject",
"table": "maillog",
"field": "subject",
"alter": {
"make_link": true,
"path": "maillog/details/[idmaillog]"
}
},
"header_from": {
"id": "header_from",
"table": "maillog",
"field": "header_from"
},
"header_to": {
"id": "header_to",
"table": "maillog",
"field": "header_to"
},
"nothing": {
"id": "nothing",
"table": "views",
"field": "nothing",
"label": "",
"exclude": true,
"alter": {
"text": "view",
"make_link": true,
"path": "maillog/details/[idmaillog]"
},
"element_label_colon": false
},
"delete_maillog": {
"id": "delete_maillog",
"table": "maillog",
"field": "delete_maillog",
"label": "",
"exclude": true,
"element_label_colon": false
},
"nothing_1": {
"id": "nothing_1",
"table": "views",
"field": "nothing",
"label": "Actions",
"alter": {
"text": "[nothing] | [delete_maillog]"
}
}
},
"sorts": {
"sent_date": {
"id": "sent_date",
"table": "maillog",
"field": "sent_date",
"order": "DESC"
}
}
}
},
"page_1": {
"display_title": "Page",
"display_plugin": "page",
"display_options": {
"query": {
"type": "views_query",
"options": []
},
"path": "admin/reports/maillog",
"menu": {
"type": "normal",
"title": "Maillog",
"description": "Show the logged mails",
"weight": "0",
"name": "management"
}
}
}
}
}
Loading

0 comments on commit f61b021

Please sign in to comment.