Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Stella Chen
/
classhook_contact
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7e7c7e5a
authored
Nov 11, 2021
by
stellaaachen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
email
parent
46a578e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
contact.ipynb
contact.ipynb
View file @
7e7c7e5a
...
...
@@ -26,7 +26,20 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"@app.route('/emails', methods = ['POST'])\n",
"def handle_request():\n",
" from email.message import EmailMessage\n",
" msg = EmailMessage()\n",
" msg.set_content('Hello World!')\n",
" msg['Subject'] = 'hi'\n",
" msg['From'] = \"classhooktest@gmail.com\"\n",
" msg['To'] = [request.json['email']]\n",
" server = smtplib.SMTP_SSL('smtp.gmail.com', 465)\n",
" server.login(\"classhooktest@gmail.com\", \"classhooktest2#\")\n",
" server.send_message(msg)\n",
" server.quit()"
]
},
{
"cell_type": "code",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment