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 95983bd4
authored
2020-07-19 16:59:01 +0000
by
Juan Pablo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
anda sin adjuntos
1 parent
d7992745
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
services.py
services.py
View file @
95983bd
...
...
@@ -196,11 +196,11 @@ class Mail(ServiceBase):
"from"
:
{
"email"
:
Mail
},
"subject"
:
msg
[
'Subject'
],
"content"
:
[{
"type"
:
"text/plain"
,
"value"
:
str
(
msg
[
"Body"
])}]}
if
not
msg
[
"Adjuntos"
]
==
0
:
if
not
len
(
msg
[
"Adjuntos"
])
==
0
:
data
[
"attachments"
]
=
msg
[
"Adjuntos"
]
#import ipdb; ipdb.set_trace()
requests
.
post
(
url
=
"https://api.sendgrid.com/v3/mail/send"
,
data
=
json
.
dumps
(
data
),
headers
=
headers
)
print
(
r
equests
.
text
)
r
=
r
equests
.
post
(
url
=
"https://api.sendgrid.com/v3/mail/send"
,
data
=
json
.
dumps
(
data
),
headers
=
headers
)
print
(
r
.
text
)
return
(
msg
[
"succ"
])
def
leerDatosparaApi
(
self
,
info
,
data
):
...
...
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