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 5afef67e
authored
2020-07-19 13:43:28 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Correccion
1 parent
68a8aca2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
process.py
services.py
process.py
View file @
5afef67
...
@@ -79,7 +79,7 @@ class Process:
...
@@ -79,7 +79,7 @@ class Process:
salio
=
salio
+
1
salio
=
salio
+
1
except
:
except
:
success
=
{
'texto'
:
False
}
success
=
{
'texto'
:
False
}
print
(
"Rompio el proseso de envio procces
71
"
)
print
(
"Rompio el proseso de envio procces
linea 82
"
)
#print("proces linea 72 success=", success)
#print("proces linea 72 success=", success)
d
=
json
.
loads
(
query
[
Table
.
type
])
d
=
json
.
loads
(
query
[
Table
.
type
])
partial
=
False
partial
=
False
...
...
services.py
View file @
5afef67
...
@@ -128,7 +128,7 @@ class Mail(ServiceBase):
...
@@ -128,7 +128,7 @@ class Mail(ServiceBase):
except
:
except
:
host
=
False
host
=
False
if
host
==
"MAILMASIVO"
:
if
host
==
"MAILMASIVO"
:
res
=
n
=
self
.
sendGrid
(
info
,
data
)
res
=
self
.
sendGrid
(
info
,
data
)
return
(
res
)
return
(
res
)
res
=
self
.
_sendClasico
(
data
,
stadomail
)
res
=
self
.
_sendClasico
(
data
,
stadomail
)
return
(
res
)
return
(
res
)
...
@@ -197,9 +197,9 @@ class Mail(ServiceBase):
...
@@ -197,9 +197,9 @@ class Mail(ServiceBase):
"subject"
:
msg
[
'Subject'
],
"subject"
:
msg
[
'Subject'
],
"content"
:
[{
"type"
:
"text/plain"
,
"value"
:
str
(
msg
[
"Body"
])}],
"content"
:
[{
"type"
:
"text/plain"
,
"value"
:
str
(
msg
[
"Body"
])}],
"attachments"
:
msg
[
"Adjuntos"
]}
"attachments"
:
msg
[
"Adjuntos"
]}
#
import ipdb; ipdb.set_trace()
import
ipdb
;
ipdb
.
set_trace
()
requests
.
post
(
url
=
"https://api.sendgrid.com/v3/mail/send"
,
data
=
json
.
dumps
(
data
),
headers
=
headers
)
requests
.
post
(
url
=
"https://api.sendgrid.com/v3/mail/send"
,
data
=
json
.
dumps
(
data
),
headers
=
headers
)
return
(
True
)
return
(
msg
[
"succ"
]
)
def
leerDatosparaApi
(
self
,
info
,
data
):
def
leerDatosparaApi
(
self
,
info
,
data
):
Cr
=
ValidacionCorreo
()
Cr
=
ValidacionCorreo
()
...
@@ -209,8 +209,10 @@ class Mail(ServiceBase):
...
@@ -209,8 +209,10 @@ class Mail(ServiceBase):
msg
[
'Subject'
]
=
info
[
'subject'
]
msg
[
'Subject'
]
=
info
[
'subject'
]
msg
[
'Body'
]
=
""
msg
[
'Body'
]
=
""
msg
[
"Adjuntos"
]
=
[]
msg
[
"Adjuntos"
]
=
[]
msg
[
"succ"
]
=
{}
for
file
in
types
:
for
file
in
types
:
filepath
=
data
[
Table
.
path
]
+
file
filepath
=
data
[
Table
.
path
]
+
file
msg
[
"succ"
][
file
]
=
True
if
file
==
'texto'
:
if
file
==
'texto'
:
objeto
=
open
(
filepath
,
"r"
)
objeto
=
open
(
filepath
,
"r"
)
msg
[
"Body"
]
=
objeto
.
read
()
msg
[
"Body"
]
=
objeto
.
read
()
...
...
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