Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions fetchmail_notify_error_to_sender/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
================================
Fetchmail Notify Error to Sender
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1c969f6d2eb7adce78c73102bfaaed24d544227208a11ab70a841ef1f7b0b527
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/15.0/fetchmail_notify_error_to_sender
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-fetchmail_notify_error_to_sender
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=15.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

If fetchmail is not able to correctly route an email, the email is
"silently" lost (you get an error message in server log).

For example, if you configure odoo mail system to route received emails
according to recipient address, it may happen users send emails to wrong
email address.

This module extends the functionality of fetchmail to allow you to
automatically send a notification email to sender, when odoo can't
correctly process the received email.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to:

#. Configure your fetchmail server setting 'Error notice template' = 'Fetchmail - error notice'.
#. You can edit the 'Fetchmail - error notice' email template according to your needs.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20fetchmail_notify_error_to_sender%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Agile Business Group
* ForgeFlow

Contributors
~~~~~~~~~~~~

* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
* Miquel Raïch <miquel.raich@forgeflow.com> (migration to v9 and v10)
* Hai Dinh <haidd.uit@gmail.com> (migration to V11)
* Nedas Zilinskas <nedas.zilinskas@xpansa.com> (Ventor, Xpansa Group <https://ventor.tech/>)
* Denis Valenchyts <denis@ventor.tech> (VentorTech OU <https://ventor.tech>)
* Helly kapatel <helly.kapatel@initos.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/15.0/fetchmail_notify_error_to_sender>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions fetchmail_notify_error_to_sender/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions fetchmail_notify_error_to_sender/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
# Copyright 2017 ForgeFlow <http://www.forgeflow.com>
# Copyright 2018 Hai Dinh <haidd.uit@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Fetchmail Notify Error to Sender",
"summary": "If fetching mails gives error, send an email to sender",
"version": "15.0.1.0.1",
"category": "Tools",
"author": "Agile Business Group,ForgeFlow,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"license": "AGPL-3",
"depends": ["fetchmail"],
"data": ["views/fetchmail_view.xml", "data/email_template_data.xml"],
"qweb": [],
"installable": True,
"application": False,
}
31 changes: 31 additions & 0 deletions fetchmail_notify_error_to_sender/data/email_template_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!--Email template -->
<record id="email_template_error_notice" model="mail.template">
<field name="name">Fetchmail - error notice</field>
<field name="email_from">{{ctx.get('sender_message').get('to')}}</field>
<field name="email_to">{{ctx.get('sender_message').get('from')}}</field>
<field
name="subject"
>Receiving error with: {{ctx.get('sender_message').get('subject')}}</field>
<field name="model_id" ref="fetchmail.model_fetchmail_server" />
<field name="auto_delete" eval="True" />
<field name="lang">{{ctx.get('lang')}}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
<div>
<p>Hello <t t-out="ctx.get('sender_message').get('from')" />,</p>
<p>we got a problem with your email: <i><t
t-out="ctx.get('sender_message').get('subject')"
/></i></p>
<p>Maybe you used a wrong recipient address?</p>
<p><br /></p>
<p>Technical details:</p>
<p><i><t t-out="ctx.get('route_exception')" /></i></p>
</div>
</p>
</div>
</field>
</record>
</odoo>
104 changes: 104 additions & 0 deletions fetchmail_notify_error_to_sender/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fetchmail_notify_error_to_sender
#
# Translators:
# Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-15 02:48+0000\n"
"PO-Revision-Date: 2017-07-15 02:48+0000\n"
"Last-Translator: Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: fetchmail_notify_error_to_sender
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice
msgid ""
"<div style=\"margin: 0px; padding: 0px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" <div>\n"
" <p>Hello <t t-out=\"ctx.get('sender_message').get('from')\"/"
">,</p>\n"
" <p>we got a problem with your email: <i><t t-out=\"ctx."
"get('sender_message').get('subject')\"/></i></p>\n"
" <p>Maybe you used a wrong recipient address?</p>\n"
" <p><br/></p>\n"
" <p>Technical details:</p>\n"
" <p><i><t t-out=\"ctx.get('route_exception')\"/></i></p>\n"
" </div>\n"
" </p>\n"
" </div>\n"
" "
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__changeset_change_ids
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__changeset_change_ids
msgid "Changeset Changes"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__changeset_ids
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__changeset_ids
msgid "Changesets"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__count_pending_changeset_changes
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__count_pending_changeset_changes
msgid "Count Pending Changeset Changes"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__count_pending_changesets
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__count_pending_changesets
msgid "Count Pending Changesets"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread
msgid "Email Thread"
msgstr "Tema del Correu electrònic "

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__error_notice_template_id
msgid "Error notice template"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:mail.template,name:fetchmail_notify_error_to_sender.email_template_error_notice
msgid "Fetchmail - error notice"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server
msgid "Incoming Mail Server"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice
msgid "Receiving error with: {{ctx.get('sender_message').get('subject')}}"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server__error_notice_template_id
msgid ""
"Set here the template to use to send notice to sender when errors occur "
"while fetching email"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__user_can_see_changeset
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__user_can_see_changeset
msgid "User Can See Changeset"
msgstr ""

#~ msgid "POP/IMAP Server"
#~ msgstr "Servidor POP/IMAP"
104 changes: 104 additions & 0 deletions fetchmail_notify_error_to_sender/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fetchmail_notify_error_to_sender
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 02:10+0000\n"
"PO-Revision-Date: 2017-12-01 02:10+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: fetchmail_notify_error_to_sender
#: model:mail.template,body_html:fetchmail_notify_error_to_sender.email_template_error_notice
msgid ""
"<div style=\"margin: 0px; padding: 0px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" <div>\n"
" <p>Hello <t t-out=\"ctx.get('sender_message').get('from')\"/"
">,</p>\n"
" <p>we got a problem with your email: <i><t t-out=\"ctx."
"get('sender_message').get('subject')\"/></i></p>\n"
" <p>Maybe you used a wrong recipient address?</p>\n"
" <p><br/></p>\n"
" <p>Technical details:</p>\n"
" <p><i><t t-out=\"ctx.get('route_exception')\"/></i></p>\n"
" </div>\n"
" </p>\n"
" </div>\n"
" "
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__changeset_change_ids
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__changeset_change_ids
msgid "Changeset Changes"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__changeset_ids
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__changeset_ids
msgid "Changesets"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__count_pending_changeset_changes
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__count_pending_changeset_changes
msgid "Count Pending Changeset Changes"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__count_pending_changesets
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__count_pending_changesets
msgid "Count Pending Changesets"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_mail_thread
msgid "Email Thread"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__error_notice_template_id
msgid "Error notice template"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:mail.template,name:fetchmail_notify_error_to_sender.email_template_error_notice
msgid "Fetchmail - error notice"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model,name:fetchmail_notify_error_to_sender.model_fetchmail_server
msgid "Incoming Mail Server"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:mail.template,subject:fetchmail_notify_error_to_sender.email_template_error_notice
msgid "Receiving error with: {{ctx.get('sender_message').get('subject')}}"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,help:fetchmail_notify_error_to_sender.field_fetchmail_server__error_notice_template_id
msgid ""
"Set here the template to use to send notice to sender when errors occur "
"while fetching email"
msgstr ""

#. module: fetchmail_notify_error_to_sender
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_fetchmail_server__user_can_see_changeset
#: model:ir.model.fields,field_description:fetchmail_notify_error_to_sender.field_mail_thread__user_can_see_changeset
msgid "User Can See Changeset"
msgstr ""

#~ msgid "POP/IMAP Server"
#~ msgstr "POP/IMAP-Server"
Loading