Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
message-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 23e50b59
authored
2024-05-04 21:06:23 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Mejora envio con copia a mail
1 parent
e358019c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
ValidacionTelefonos.py
services.py
ValidacionTelefonos.py
View file @
23e50b5
...
...
@@ -33,6 +33,9 @@ class ValidacionCorreo():
Correo
=
Correo
.
replace
(
" "
,
""
)
Correo
=
Correo
.
replace
(
"
\t
"
,
""
)
Correo
=
Correo
.
replace
(
"
\n
"
,
""
)
Correo
=
Correo
.
replace
(
";"
,
","
)
if
len
(
Correo
.
split
(
","
))
>
1
:
return
(
Correo
)
if
self
.
validarcorreo
(
Correo
)
==
False
:
Correo
=
False
return
(
Correo
)
...
...
services.py
View file @
23e50b5
...
...
@@ -128,6 +128,7 @@ class Mail(ServiceBase):
host
=
info
[
"smtp"
][
"host"
]
except
:
host
=
False
#Aca inserto deteccion de multiples objetivos
if
host
==
"MAILMASIVO"
:
res
=
self
.
sendGrid
(
info
,
data
)
return
(
res
)
...
...
@@ -141,8 +142,11 @@ class Mail(ServiceBase):
msg
=
MIMEMultipart
()
Cr
=
ValidacionCorreo
()
msg
[
'From'
]
=
self
.
Usuario
(
info
)
msg
[
'To'
]
=
Cr
.
ValidarCorreo
(
data
[
Table
.
dest
])
destino
=
data
[
Table
.
dest
]
#print(destino)
msg
[
'Subject'
]
=
info
[
'subject'
]
msg
[
"To"
]
=
Cr
.
ValidarCorreo
(
destino
)
print
(
"destino"
,
msg
[
"To"
])
succ
=
{}
if
msg
[
'To'
]
==
False
:
print
(
"mail no sale"
)
...
...
@@ -156,7 +160,12 @@ class Mail(ServiceBase):
succ
[
file
]
=
True
try
:
if
not
msg
[
'From'
]
in
stadomail
.
MailRompedor
:
#Multienvio
#for destino in msg['To'].split(","):
# Msg = msg.copy()
# Msg["To"] = Cr.ValidarCorreo(destino)
self
.
Envio
(
msg
,
info
,
stadomail
)
#self.Envio(msg,info,stadomail)
else
:
succ
[
file
]
=
False
except
Exception
as
E
:
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment