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 d7992745
authored
2020-07-19 13:50:59 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Correccion
1 parent
5afef67e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
services.py
services.py
View file @
d799274
...
...
@@ -195,10 +195,12 @@ class Mail(ServiceBase):
data
=
{
"personalizations"
:
[{
"to"
:
[{
"email"
:
msg
[
'To'
]}]}],
"from"
:
{
"email"
:
Mail
},
"subject"
:
msg
[
'Subject'
],
"content"
:
[{
"type"
:
"text/plain"
,
"value"
:
str
(
msg
[
"Body"
])}],
"attachments"
:
msg
[
"Adjuntos"
]}
import
ipdb
;
ipdb
.
set_trace
()
"content"
:
[{
"type"
:
"text/plain"
,
"value"
:
str
(
msg
[
"Body"
])}]}
if
not
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
(
requests
.
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