Justin Grammens
commited on
Commit
·
5827eb5
1
Parent(s):
709c73e
latest updates
Browse files
app.py
CHANGED
@@ -51,7 +51,9 @@ prompt = PromptTemplate(
|
|
51 |
|
52 |
def send_simple_message(essay, email):
|
53 |
print("SENT THIS TEXT", essay, "to this email", email)
|
54 |
-
|
|
|
|
|
55 |
os.environ["MAILGUN_POST_URL"],
|
56 |
auth=("api", os.environ["MAILGUN_API_KEY"]),
|
57 |
data={"from": os.environ["PLP_RETURN_EMAIL_ADDRESS"],
|
@@ -60,6 +62,13 @@ def send_simple_message(essay, email):
|
|
60 |
"text": essay}
|
61 |
)
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
# Add an alert box to notify the user if the email was sent correctly
|
64 |
def show_alert(result):
|
65 |
if result.status_code == 200:
|
|
|
51 |
|
52 |
def send_simple_message(essay, email):
|
53 |
print("SENT THIS TEXT", essay, "to this email", email)
|
54 |
+
print(os.environ["MAILGUN_POST_URL"])
|
55 |
+
|
56 |
+
jj = requests.post(
|
57 |
os.environ["MAILGUN_POST_URL"],
|
58 |
auth=("api", os.environ["MAILGUN_API_KEY"]),
|
59 |
data={"from": os.environ["PLP_RETURN_EMAIL_ADDRESS"],
|
|
|
62 |
"text": essay}
|
63 |
)
|
64 |
|
65 |
+
print(jj.content)
|
66 |
+
print(jj.reason)
|
67 |
+
print(jj.status_code)
|
68 |
+
print(jj.text)
|
69 |
+
print(jj.headers)
|
70 |
+
return jj
|
71 |
+
|
72 |
# Add an alert box to notify the user if the email was sent correctly
|
73 |
def show_alert(result):
|
74 |
if result.status_code == 200:
|