diff --git a/account_automate_invoice_mail/__init__.py b/account_automate_invoice_mail/__init__.py
new file mode 100644
index 00000000000..d6210b1285d
--- /dev/null
+++ b/account_automate_invoice_mail/__init__.py
@@ -0,0 +1,3 @@
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from . import models
diff --git a/account_automate_invoice_mail/__manifest__.py b/account_automate_invoice_mail/__manifest__.py
new file mode 100644
index 00000000000..6aa12c66d17
--- /dev/null
+++ b/account_automate_invoice_mail/__manifest__.py
@@ -0,0 +1,8 @@
+{
+ "name": "Account automate invoice mail",
+ "version": "0.1",
+ "depends": ["account"],
+ "installable": True,
+ "license": "LGPL-3",
+ "data": ["views/res_config_settings_views.xml", "data/send_invoice_cron.xml"]
+}
diff --git a/account_automate_invoice_mail/data/send_invoice_cron.xml b/account_automate_invoice_mail/data/send_invoice_cron.xml
new file mode 100644
index 00000000000..2ae679552a9
--- /dev/null
+++ b/account_automate_invoice_mail/data/send_invoice_cron.xml
@@ -0,0 +1,12 @@
+
+
+ Send Invoices by email automatically
+
+
+ code
+ model._cron_send_invoice_by_email()
+ 1
+ days
+ True
+
+
diff --git a/account_automate_invoice_mail/models/__init__.py b/account_automate_invoice_mail/models/__init__.py
new file mode 100644
index 00000000000..0c548851701
--- /dev/null
+++ b/account_automate_invoice_mail/models/__init__.py
@@ -0,0 +1,4 @@
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from . import res_config_settings
+from . import account_move
diff --git a/account_automate_invoice_mail/models/account_move.py b/account_automate_invoice_mail/models/account_move.py
new file mode 100644
index 00000000000..ac72d7584b3
--- /dev/null
+++ b/account_automate_invoice_mail/models/account_move.py
@@ -0,0 +1,19 @@
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from datetime import date, timedelta
+from odoo import api, models
+
+
+class AccountMove(models.Model):
+ _inherit = "account.move"
+
+ @api.model
+ def _cron_send_invoice_by_email(self):
+ """
+ Uses `sudo()` to securely access system configuration parameters.
+ """
+ send_invoice_days = int(self.env["ir.config_parameter"].sudo().get_param("send_email_invoice_days"))
+ target_invoice_date = date.today() - timedelta(days=send_invoice_days)
+ invoices = self.search([('state', '=', 'posted'), ('invoice_date', '=', target_invoice_date)])
+ template = self.env.ref("account.email_template_edi_invoice")
+ self.env['account.move.send']._generate_and_send_invoices(invoices, mail_template=template)
diff --git a/account_automate_invoice_mail/models/res_config_settings.py b/account_automate_invoice_mail/models/res_config_settings.py
new file mode 100644
index 00000000000..70bd6271f09
--- /dev/null
+++ b/account_automate_invoice_mail/models/res_config_settings.py
@@ -0,0 +1,9 @@
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import models, fields
+
+
+class ResConfigSettings(models.TransientModel):
+ _inherit = "res.config.settings"
+
+ send_email_invoice_days = fields.Integer(string="Send invoice by email", config_parameter="send_email_invoice_days")
diff --git a/account_automate_invoice_mail/views/res_config_settings_views.xml b/account_automate_invoice_mail/views/res_config_settings_views.xml
new file mode 100644
index 00000000000..72a09efd9d0
--- /dev/null
+++ b/account_automate_invoice_mail/views/res_config_settings_views.xml
@@ -0,0 +1,16 @@
+
+
+
+ res.config.settings.view.inherit.invoice_automate_mail
+ res.config.settings
+
+
+
+
+
+
+
+
+
+
+