django-codenerix-email 4.0.54__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. codenerix_email/__init__.py +6 -0
  2. codenerix_email/admin.py +40 -0
  3. codenerix_email/apps.py +6 -0
  4. codenerix_email/forms.py +239 -0
  5. codenerix_email/locale/en/LC_MESSAGES/django.po +295 -0
  6. codenerix_email/locale/es/LC_MESSAGES/django.mo +0 -0
  7. codenerix_email/locale/es/LC_MESSAGES/django.po +303 -0
  8. codenerix_email/management/__init__.py +0 -0
  9. codenerix_email/management/commands/__init__.py +0 -0
  10. codenerix_email/management/commands/email_test.py +180 -0
  11. codenerix_email/management/commands/emails_recv.py +1027 -0
  12. codenerix_email/management/commands/emails_send.py +278 -0
  13. codenerix_email/management/commands/recv_emails.py +9 -0
  14. codenerix_email/management/commands/send_emails.py +9 -0
  15. codenerix_email/management/commands/test_email.py +9 -0
  16. codenerix_email/migrations/0001_initial.py +183 -0
  17. codenerix_email/migrations/0002_auto_20170502_1043.py +60 -0
  18. codenerix_email/migrations/0003_auto_20170921_1206.py +23 -0
  19. codenerix_email/migrations/0004_auto_20171108_1628.py +20 -0
  20. codenerix_email/migrations/0005_emailmessage_retries.py +20 -0
  21. codenerix_email/migrations/0006_emailmessage_error.py +20 -0
  22. codenerix_email/migrations/0007_emailmessage_next_retry.py +22 -0
  23. codenerix_email/migrations/0008_auto_20171201_0928.py +26 -0
  24. codenerix_email/migrations/0009_emailmessage_opened_emailmessage_uuid.py +44 -0
  25. codenerix_email/migrations/0010_emailmessage_content_subtype_and_more.py +35 -0
  26. codenerix_email/migrations/0011_alter_emailmessage_content_subtype_and_more.py +33 -0
  27. codenerix_email/migrations/0012_emailmessage_unsubscribe_url.py +20 -0
  28. codenerix_email/migrations/0013_emailmessage_headers.py +18 -0
  29. codenerix_email/migrations/0014_emailreceived.py +95 -0
  30. codenerix_email/migrations/0015_emailmessage_bounces_hard_emailmessage_bounces_soft_and_more.py +28 -0
  31. codenerix_email/migrations/0016_alter_emailattachment_options_and_more.py +94 -0
  32. codenerix_email/migrations/__init__.py +0 -0
  33. codenerix_email/models.py +776 -0
  34. codenerix_email/py.typed +0 -0
  35. codenerix_email/static/codenerix_email/emailmessages_rows.html +38 -0
  36. codenerix_email/static/codenerix_email/emailreceiveds_rows.html +26 -0
  37. codenerix_email/test_settings.py +29 -0
  38. codenerix_email/urls.py +135 -0
  39. codenerix_email/urls_frontend.py +31 -0
  40. codenerix_email/views.py +270 -0
  41. django_codenerix_email-4.0.54.dist-info/METADATA +84 -0
  42. django_codenerix_email-4.0.54.dist-info/RECORD +44 -0
  43. django_codenerix_email-4.0.54.dist-info/WHEEL +4 -0
  44. django_codenerix_email-4.0.54.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,6 @@
1
+ __version__ = "4.0.54"
2
+
3
+ __authors__ = [
4
+ "Juan Miguel Taboada Godoy <juanmi@juanmitaboada.com>",
5
+ "Juan Soler Ruiz <soleronline@gmail.com>",
6
+ ]
@@ -0,0 +1,40 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # django-codenerix-email
4
+ #
5
+ # Codenerix GNU
6
+ #
7
+ # Project URL : http://www.codenerix.com
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+
21
+ from django.conf import settings
22
+ from django.contrib import admin
23
+ from codenerix_email.models import (
24
+ EmailMessage,
25
+ EmailAttachment,
26
+ EmailTemplate,
27
+ MODELS,
28
+ )
29
+
30
+ admin.site.register(EmailMessage)
31
+ admin.site.register(EmailAttachment)
32
+ admin.site.register(EmailTemplate)
33
+
34
+
35
+ for info in MODELS:
36
+ model = info[1]
37
+ for lang_code in settings.LANGUAGES_DATABASES:
38
+ query = f"from .models import {model}Text{lang_code}\n"
39
+ query += f"admin.site.register({model}Text{lang_code})\n"
40
+ exec(query)
@@ -0,0 +1,6 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class MyAppConfig(AppConfig):
5
+ default_auto_field = 'django.db.models.AutoField'
6
+ name = 'codenerix_email'
@@ -0,0 +1,239 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # django-codenerix-email
4
+ #
5
+ # Codenerix GNU
6
+ #
7
+ # Project URL : http://www.codenerix.com
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+
21
+ from typing import Any
22
+
23
+ from django.utils.translation import gettext_lazy as _
24
+ from django.conf import settings
25
+
26
+ from codenerix.forms import GenModelForm
27
+ from codenerix_email.models import (
28
+ EmailTemplate,
29
+ EmailMessage,
30
+ EmailReceived,
31
+ MODELS,
32
+ )
33
+
34
+
35
+ class EmailTemplateForm(GenModelForm):
36
+ class Meta:
37
+ model = EmailTemplate
38
+ exclude: list[Any] = []
39
+
40
+ def __groups__(self):
41
+ return [
42
+ (
43
+ _("Details"),
44
+ 12,
45
+ (
46
+ None,
47
+ 3,
48
+ ["cid", 12],
49
+ ["content_subtype", 12],
50
+ ),
51
+ (
52
+ None,
53
+ 9,
54
+ ["efrom", 9],
55
+ ),
56
+ ),
57
+ ]
58
+
59
+ @staticmethod
60
+ def __groups_details__():
61
+ return [
62
+ (
63
+ _("Details"),
64
+ 12,
65
+ ["cid", 3],
66
+ ["efrom", 9],
67
+ )
68
+ ]
69
+
70
+
71
+ class EmailMessageForm(GenModelForm):
72
+ class Meta:
73
+ model = EmailMessage
74
+ exclude = [
75
+ "sending",
76
+ "log",
77
+ "opened",
78
+ "unsubscribe_url",
79
+ "bounces_total",
80
+ "bounces_soft",
81
+ "bounces_hard",
82
+ ]
83
+
84
+ def __groups__(self):
85
+ return [
86
+ (
87
+ _("Basics"),
88
+ 8,
89
+ ["efrom", 6],
90
+ ["eto", 6],
91
+ ["subject", 12],
92
+ ),
93
+ (
94
+ _("Control"),
95
+ 4,
96
+ ["priority", 4],
97
+ ["sent", 4],
98
+ ["error", 4],
99
+ ["retries", 4],
100
+ ["content_subtype", 8],
101
+ ),
102
+ (
103
+ _("Contents"),
104
+ 12,
105
+ ["headers", 12],
106
+ ["body", 12],
107
+ ),
108
+ ]
109
+
110
+ @staticmethod
111
+ def __groups_details__():
112
+ return [
113
+ (
114
+ _("Details"),
115
+ 4,
116
+ ["uuid", 3],
117
+ ["created", 3],
118
+ ["updated", 3],
119
+ ["efrom", 3],
120
+ ["eto", 3],
121
+ ["subject", 3],
122
+ ["opened", 3],
123
+ ),
124
+ (
125
+ _("System"),
126
+ 4,
127
+ ["sending", 3],
128
+ ["sent", 3],
129
+ ["error", 3],
130
+ ["log", 3],
131
+ ["content_subtype", 3],
132
+ ["unsubscribe_url", 3],
133
+ ["headers", 3],
134
+ ),
135
+ (
136
+ _("Status"),
137
+ 4,
138
+ ["retries", 3],
139
+ ["priority", 3],
140
+ ["bounces_total", 3],
141
+ ["bounces_soft", 3],
142
+ ["bounces_hard", 3],
143
+ ),
144
+ (
145
+ _("Body"),
146
+ 12,
147
+ ["body", 3],
148
+ ),
149
+ ]
150
+
151
+
152
+ class EmailReceivedForm(GenModelForm):
153
+ class Meta:
154
+ model = EmailReceived
155
+ exclude = ["sending", "log"]
156
+
157
+ # def __groups__(self):
158
+ # return [
159
+ # (
160
+ # _("Details"),
161
+ # 12,
162
+ # ["efrom", 2],
163
+ # ["eto", 2],
164
+ # ["subject", 4],
165
+ # ["priority", 1],
166
+ # ["sent", 1],
167
+ # ["error", 1],
168
+ # ["retries", 1],
169
+ # ["body", 12],
170
+ # )
171
+ # ]
172
+
173
+ @staticmethod
174
+ def __groups_details__():
175
+ return [
176
+ (
177
+ _("Details"),
178
+ 6,
179
+ ["imap_id", 3],
180
+ ["eid", 3],
181
+ ["created", 3],
182
+ ["updated", 3],
183
+ ["efrom", 3],
184
+ ["eto", 3],
185
+ ["subject", 3],
186
+ ["bounce_type", 3],
187
+ ["bounce_reason", 3],
188
+ ["email", 3],
189
+ ),
190
+ (
191
+ _("System"),
192
+ 6,
193
+ ["headers", None],
194
+ ["headers_pretty", 3],
195
+ ),
196
+ (
197
+ _("Body"),
198
+ 12,
199
+ ["body_text", 12],
200
+ ["body_html", 12],
201
+ ),
202
+ ]
203
+
204
+
205
+ for info in MODELS:
206
+ field = info[0]
207
+ model = info[1]
208
+ for lang_code in settings.LANGUAGES_DATABASES:
209
+ query = "from codenerix_email.models import {}Text{}\n".format(
210
+ model, lang_code
211
+ )
212
+ exec(query)
213
+ query = """
214
+ class {model}TextForm{lang}(GenModelForm):\n
215
+ class Meta:\n
216
+ model={model}Text{lang}\n
217
+ exclude = []\n
218
+ def __groups__(self):\n
219
+ return [(_('Details'),12,"""
220
+
221
+ if lang_code == settings.LANGUAGES_DATABASES[0]:
222
+ query += """
223
+ ['subject', 12, None, None, None, None, None, ["ng-change=refresh_lang_field('subject', '{model}TextForm', [{languages}])"]],
224
+ ['body', 12, None, None, None, None, None, ["ng-blur=refresh_lang_field('body', '{model}TextForm', [{languages}])"]],
225
+ )]\n""" # noqa: E501
226
+ else:
227
+ query += """
228
+ ['subject', 12],
229
+ ['body', 12],
230
+ )]\n"""
231
+ exec(
232
+ query.format(
233
+ model=model,
234
+ lang=lang_code,
235
+ languages="'{}'".format(
236
+ "','".join(settings.LANGUAGES_DATABASES)
237
+ ),
238
+ )
239
+ )
@@ -0,0 +1,295 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2026-11-06 14:26+0100\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+
20
+ #: codenerix_email/forms.py:43 codenerix_email/forms.py:63
21
+ #: codenerix_email/forms.py:114 codenerix_email/forms.py:177
22
+ msgid "Details"
23
+ msgstr ""
24
+
25
+ #: codenerix_email/forms.py:87
26
+ msgid "Basics"
27
+ msgstr ""
28
+
29
+ #: codenerix_email/forms.py:94
30
+ msgid "Control"
31
+ msgstr ""
32
+
33
+ #: codenerix_email/forms.py:103
34
+ msgid "Contents"
35
+ msgstr ""
36
+
37
+ #: codenerix_email/forms.py:125 codenerix_email/forms.py:191
38
+ msgid "System"
39
+ msgstr ""
40
+
41
+ #: codenerix_email/forms.py:136
42
+ msgid "Status"
43
+ msgstr ""
44
+
45
+ #: codenerix_email/forms.py:145 codenerix_email/forms.py:197
46
+ #: codenerix_email/models.py:94 codenerix_email/models.py:747
47
+ #: codenerix_email/models.py:752
48
+ msgid "Body"
49
+ msgstr ""
50
+
51
+ #: codenerix_email/models.py:50
52
+ msgid "Plain"
53
+ msgstr ""
54
+
55
+ #: codenerix_email/models.py:51
56
+ msgid "HTML Web"
57
+ msgstr ""
58
+
59
+ #: codenerix_email/models.py:57 codenerix_email/models.py:649
60
+ msgid "Soft"
61
+ msgstr ""
62
+
63
+ #: codenerix_email/models.py:58 codenerix_email/models.py:650
64
+ msgid "Hard"
65
+ msgstr ""
66
+
67
+ #: codenerix_email/models.py:84 codenerix_email/models.py:160
68
+ #: codenerix_email/models.py:198
69
+ msgid "UUID"
70
+ msgstr ""
71
+
72
+ #: codenerix_email/models.py:91 codenerix_email/models.py:583
73
+ #: codenerix_email/models.py:616 codenerix_email/models.py:633
74
+ #: codenerix_email/models.py:676 codenerix_email/models.py:690
75
+ #: codenerix_email/views.py:134
76
+ msgid "From"
77
+ msgstr ""
78
+
79
+ #: codenerix_email/models.py:92 codenerix_email/models.py:154
80
+ #: codenerix_email/models.py:205 codenerix_email/models.py:584
81
+ #: codenerix_email/models.py:617 codenerix_email/models.py:634
82
+ msgid "To"
83
+ msgstr ""
84
+
85
+ #: codenerix_email/models.py:93 codenerix_email/models.py:155
86
+ #: codenerix_email/models.py:585 codenerix_email/models.py:618
87
+ #: codenerix_email/models.py:746 codenerix_email/models.py:751
88
+ #: codenerix_email/views.py:138
89
+ msgid "Subject"
90
+ msgstr ""
91
+
92
+ #: codenerix_email/models.py:96 codenerix_email/models.py:149
93
+ msgid "Priority"
94
+ msgstr ""
95
+
96
+ #: codenerix_email/models.py:98 codenerix_email/models.py:192
97
+ #: codenerix_email/views.py:181 codenerix_email/views.py:243
98
+ msgid "Sending"
99
+ msgstr ""
100
+
101
+ #: codenerix_email/models.py:99 codenerix_email/models.py:190
102
+ #: codenerix_email/models.py:197 codenerix_email/views.py:182
103
+ #: codenerix_email/views.py:244
104
+ msgid "Sent"
105
+ msgstr ""
106
+
107
+ #: codenerix_email/models.py:100 codenerix_email/models.py:193
108
+ msgid "Error"
109
+ msgstr ""
110
+
111
+ #: codenerix_email/models.py:102 codenerix_email/models.py:157
112
+ msgid "Retries"
113
+ msgstr ""
114
+
115
+ #: codenerix_email/models.py:104 codenerix_email/models.py:158
116
+ msgid "Next retry"
117
+ msgstr ""
118
+
119
+ #: codenerix_email/models.py:105
120
+ msgid "Log"
121
+ msgstr ""
122
+
123
+ #: codenerix_email/models.py:106 codenerix_email/models.py:152
124
+ #: codenerix_email/models.py:200
125
+ msgid "Opened"
126
+ msgstr ""
127
+
128
+ #: codenerix_email/models.py:108 codenerix_email/models.py:162
129
+ #: codenerix_email/models.py:678 codenerix_email/models.py:691
130
+ #: codenerix_email/views.py:144
131
+ msgid "Content Subtype"
132
+ msgstr ""
133
+
134
+ #: codenerix_email/models.py:115
135
+ msgid "Unsubscribe URL"
136
+ msgstr ""
137
+
138
+ #: codenerix_email/models.py:116 codenerix_email/models.py:586
139
+ msgid "Headers"
140
+ msgstr ""
141
+
142
+ #: codenerix_email/models.py:118
143
+ msgid "Soft bounces"
144
+ msgstr ""
145
+
146
+ #: codenerix_email/models.py:121
147
+ msgid "Hard bounces"
148
+ msgstr ""
149
+
150
+ #: codenerix_email/models.py:124
151
+ msgid "Total bounces"
152
+ msgstr ""
153
+
154
+ #: codenerix_email/models.py:148
155
+ msgid "Send"
156
+ msgstr ""
157
+
158
+ #: codenerix_email/models.py:150
159
+ msgid "Created"
160
+ msgstr ""
161
+
162
+ #: codenerix_email/models.py:151
163
+ msgid "Updated"
164
+ msgstr ""
165
+
166
+ #: codenerix_email/models.py:156
167
+ msgid "Bounces"
168
+ msgstr ""
169
+
170
+ #: codenerix_email/models.py:159 codenerix_email/models.py:206
171
+ msgid "ID"
172
+ msgstr ""
173
+
174
+ #: codenerix_email/models.py:161
175
+ msgid "Unsubscribe"
176
+ msgstr ""
177
+
178
+ #: codenerix_email/models.py:191
179
+ msgid "Pending"
180
+ msgstr ""
181
+
182
+ #: codenerix_email/models.py:202
183
+ msgid "Yes"
184
+ msgstr ""
185
+
186
+ #: codenerix_email/models.py:202
187
+ msgid "No"
188
+ msgstr ""
189
+
190
+ #: codenerix_email/models.py:214
191
+ msgid "HEADERS must be a Dictionary"
192
+ msgstr ""
193
+
194
+ #: codenerix_email/models.py:562 codenerix_email/models.py:569
195
+ msgid "Filename"
196
+ msgstr ""
197
+
198
+ #: codenerix_email/models.py:563 codenerix_email/models.py:570
199
+ msgid "Mimetype"
200
+ msgstr ""
201
+
202
+ #: codenerix_email/models.py:564 codenerix_email/models.py:571
203
+ msgid "Path"
204
+ msgstr ""
205
+
206
+ #: codenerix_email/models.py:568
207
+ msgid "Email"
208
+ msgstr ""
209
+
210
+ #: codenerix_email/models.py:576 codenerix_email/models.py:622
211
+ msgid "IMAP ID"
212
+ msgstr ""
213
+
214
+ #: codenerix_email/models.py:578
215
+ msgid "Message ID"
216
+ msgstr ""
217
+
218
+ #: codenerix_email/models.py:581
219
+ msgid "Unique Message-ID header"
220
+ msgstr ""
221
+
222
+ #: codenerix_email/models.py:587
223
+ msgid "Body (Text)"
224
+ msgstr ""
225
+
226
+ #: codenerix_email/models.py:588
227
+ msgid "Body (HTML)"
228
+ msgstr ""
229
+
230
+ #: codenerix_email/models.py:589 codenerix_email/models.py:613
231
+ msgid "Date received"
232
+ msgstr ""
233
+
234
+ #: codenerix_email/models.py:600 codenerix_email/models.py:615
235
+ #: codenerix_email/models.py:646
236
+ msgid "Bounce Type"
237
+ msgstr ""
238
+
239
+ #: codenerix_email/models.py:608
240
+ msgid "Bounce Reason"
241
+ msgstr ""
242
+
243
+ #: codenerix_email/models.py:619 codenerix_email/models.py:641
244
+ msgid "Related email"
245
+ msgstr ""
246
+
247
+ #: codenerix_email/models.py:636
248
+ msgid "Related To"
249
+ msgstr ""
250
+
251
+ #: codenerix_email/models.py:651
252
+ msgid "No Bounce"
253
+ msgstr ""
254
+
255
+ #: codenerix_email/models.py:652
256
+ msgid "Only Bounces"
257
+ msgstr ""
258
+
259
+ #: codenerix_email/models.py:674 codenerix_email/models.py:689
260
+ #: codenerix_email/views.py:133
261
+ msgid "CID"
262
+ msgstr ""
263
+
264
+ #: codenerix_email/models.py:688 codenerix_email/views.py:132
265
+ msgid "PK"
266
+ msgstr ""
267
+
268
+ #: codenerix_email/models.py:738
269
+ msgid "CID can contains only number and letters with no spaces"
270
+ msgstr ""
271
+
272
+ #: codenerix_email/views.py:127 codenerix_email/views.py:188
273
+ #: codenerix_email/views.py:250
274
+ msgid "Emails"
275
+ msgstr ""
276
+
277
+ #: codenerix_email/views.py:127
278
+ msgid "Email Template"
279
+ msgstr ""
280
+
281
+ #: codenerix_email/views.py:183 codenerix_email/views.py:245
282
+ msgid "Not sent!"
283
+ msgstr ""
284
+
285
+ #: codenerix_email/views.py:184 codenerix_email/views.py:246
286
+ msgid "Waiting"
287
+ msgstr ""
288
+
289
+ #: codenerix_email/views.py:188 codenerix_email/views.py:250
290
+ msgid "Email Messages"
291
+ msgstr ""
292
+
293
+ #: codenerix_email/views.py:208
294
+ msgid "Received"
295
+ msgstr ""