-
Notifications
You must be signed in to change notification settings - Fork 1
/
emaill.py
22 lines (22 loc) · 1019 Bytes
/
emaill.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from trycourier import Courier
#additional feature
def send_email(email,ans,auth):
client = Courier(auth_token=auth)
client.send_message(
message={
"to": {
"email": f"{email}",
},
"content": {
"title": f"Answer from Research-Buddy",
"body": f"Hey ! \n Check out the answer to your question below. \nDo not reply back to this email. \n\n {ans}\nRegards\nResearch Buddy",
},
"data": {"note": f"\nDo not reply back to this email. \n\n {ans}\nRegards,\nReseach Buddy",
},
"routing": {
"method": "single",
"channels": ["email"],
},
}
)
return True