smtp icloud working config
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": null,
|
||||||
"id": "43f466e6-b25d-40ac-a36e-982650e3e8ed",
|
"id": "43f466e6-b25d-40ac-a36e-982650e3e8ed",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -15,21 +15,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"id": "45ec6b06-b667-46c2-9430-89f45b490c13",
|
"id": "45ec6b06-b667-46c2-9430-89f45b490c13",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"True"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"execution_count": 2,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# need to recall when edited\n",
|
"# need to recall when edited\n",
|
||||||
"load_dotenv()"
|
"load_dotenv()"
|
||||||
@@ -37,19 +26,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": null,
|
||||||
"id": "289d0ee8-21ca-4ab8-8514-2f6a248cd19f",
|
"id": "289d0ee8-21ca-4ab8-8514-2f6a248cd19f",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"email to: cheeloychang@gmail.com\n",
|
|
||||||
"email from: spareclass@spareclass.com\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"smtp_server = os.getenv(\"SMTP_SRV\")\n",
|
"smtp_server = os.getenv(\"SMTP_SRV\")\n",
|
||||||
"smtp_port = os.getenv(\"SMTP_PORT\")\n",
|
"smtp_port = os.getenv(\"SMTP_PORT\")\n",
|
||||||
@@ -64,21 +44,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": null,
|
||||||
"id": "7e57d507-242f-4c9b-9acc-557dd9429966",
|
"id": "7e57d507-242f-4c9b-9acc-557dd9429966",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"(235, b'2.7.0 Authentication successful')"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"execution_count": 4,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"server = smtplib.SMTP(smtp_server, smtp_port)\n",
|
"server = smtplib.SMTP(smtp_server, smtp_port)\n",
|
||||||
"server.starttls()\n",
|
"server.starttls()\n",
|
||||||
@@ -87,7 +56,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": null,
|
||||||
"id": "97b89233-abb9-4d51-aa3e-5d32c3be34ab",
|
"id": "97b89233-abb9-4d51-aa3e-5d32c3be34ab",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
|
Reference in New Issue
Block a user