leadguru-jobs 0.585.0__py3-none-any.whl → 0.587.0__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.
- {leadguru_jobs-0.585.0.dist-info → leadguru_jobs-0.587.0.dist-info}/METADATA +1 -1
- {leadguru_jobs-0.585.0.dist-info → leadguru_jobs-0.587.0.dist-info}/RECORD +5 -5
- lgt_jobs/smtp.py +6 -5
- {leadguru_jobs-0.585.0.dist-info → leadguru_jobs-0.587.0.dist-info}/WHEEL +0 -0
- {leadguru_jobs-0.585.0.dist-info → leadguru_jobs-0.587.0.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,7 @@ lgt_jobs/env.py,sha256=cRO03GGvstUjBsv3uYO-iakrOvAk_ZWUP_fnmf21iZQ,789
|
|
4
4
|
lgt_jobs/main.py,sha256=cK_nkBtJHnUNDbba1WZotqPtI_6OWxiYQkAgco9OAmE,1539
|
5
5
|
lgt_jobs/runner.py,sha256=7KHpMHWwCjDlPDKnkNqrGAyIVn4Po62VqjYGVa85if8,2218
|
6
6
|
lgt_jobs/simple_job.py,sha256=sta7MP-57iwRewPycmTAc9dvSbocbGjWhb1QYYj7ccA,519
|
7
|
-
lgt_jobs/smtp.py,sha256=
|
7
|
+
lgt_jobs/smtp.py,sha256=k0qh-Qk9AeSU3WrCOVmuWkfpi9xzwaPMzbw9cED-pZw,1150
|
8
8
|
lgt_jobs/assets/images/arrow.png,sha256=Lr_zG1TyySAWX78jiojcV7j8BHe2S_Oi7eZYAfe4YbM,536
|
9
9
|
lgt_jobs/assets/images/firework.png,sha256=9d_0lUpDFfT3e4JTgp5XVb03qAdtO9yNVi1c1KoQDp8,33754
|
10
10
|
lgt_jobs/assets/images/lock.png,sha256=515llTFqboG9PYXIrXhlbPZ5lQOHXjEYyQkXc9WfJxc,5978
|
@@ -48,7 +48,7 @@ lgt_jobs/lgt_data/mongo_repository.py,sha256=kLE906lfqhHF9gp1qvH_3XKCZGCZnxjLMrB
|
|
48
48
|
lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
lgt_jobs/services/web_client.py,sha256=GLWsJkIC8rv6xLFaLwcMm4EwBlVDu0njORwkZqBJaE4,2086
|
50
50
|
lgt_jobs/templates/new_message.html,sha256=dZl8UmdAOOMq4nidvAgMFroSrTV7Pw0RWt2yLp_2idg,6989
|
51
|
-
leadguru_jobs-0.
|
52
|
-
leadguru_jobs-0.
|
53
|
-
leadguru_jobs-0.
|
54
|
-
leadguru_jobs-0.
|
51
|
+
leadguru_jobs-0.587.0.dist-info/METADATA,sha256=MPIxEW1Inlsqy1YT-kHPIcOxgL2oFYvbtFWYLyYkMHA,1319
|
52
|
+
leadguru_jobs-0.587.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
53
|
+
leadguru_jobs-0.587.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
|
54
|
+
leadguru_jobs-0.587.0.dist-info/RECORD,,
|
lgt_jobs/smtp.py
CHANGED
@@ -2,7 +2,7 @@ from abc import ABC
|
|
2
2
|
from pydantic import BaseModel
|
3
3
|
import logging as log
|
4
4
|
from lgt_jobs.basejobs import BaseBackgroundJobData, BaseBackgroundJob
|
5
|
-
from lgt_jobs.env import smtp_login, smtp_password
|
5
|
+
from lgt_jobs.env import smtp_login, smtp_password
|
6
6
|
from lgt_jobs.lgt_data.enums import ImageName
|
7
7
|
|
8
8
|
"""
|
@@ -14,7 +14,7 @@ class SendMailJobData(BaseBackgroundJobData, BaseModel):
|
|
14
14
|
html: str
|
15
15
|
subject: str
|
16
16
|
recipient: str
|
17
|
-
sender: str = "noreply@leadguru.
|
17
|
+
sender: str = "noreply@leadguru.io"
|
18
18
|
images: list[ImageName] = []
|
19
19
|
|
20
20
|
|
@@ -24,13 +24,14 @@ class SendMailJob(BaseBackgroundJob, ABC):
|
|
24
24
|
return SendMailJobData
|
25
25
|
|
26
26
|
def exec(self, data: SendMailJobData):
|
27
|
-
from redmail import
|
28
|
-
|
27
|
+
from redmail import gmail
|
28
|
+
gmail.username = smtp_login
|
29
|
+
gmail.password = smtp_password
|
29
30
|
body_image = {}
|
30
31
|
for image in data.images:
|
31
32
|
body_image[f'IMAGE_{ImageName(image.value).name}'] = f'lgt_jobs/assets/images/{image.value}'
|
32
33
|
|
33
|
-
|
34
|
+
gmail.send(
|
34
35
|
sender=f"Leadguru <{data.sender}>",
|
35
36
|
receivers=[data.recipient],
|
36
37
|
subject=data.subject,
|
File without changes
|
File without changes
|