Team Ai
Apppublic

Decoder2704/python-chatbot-jay

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
mailing.ipynb72 linesDownload Raw Back to root
1{2 "cells": [3  {4   "cell_type": "code",5   "execution_count": 1,6   "id": "e6133bf0",7   "metadata": {},8   "outputs": [],9   "source": [10    "import smtplib\n",11    "from email.message import EmailMessage"12   ]13  },14  {15   "cell_type": "code",16   "execution_count": 5,17   "id": "da055cd4",18   "metadata": {},19   "outputs": [],20   "source": [21    "def mail(Aid):\n",22    "    sender_mail = 'pybotservice@gmail.com'\n",23    "    receivers_mail = ['chinmay.is18@bmsce.ac.in','nikhil.is18@bmsce.ac.in','jay.is18@bmsce.ac.in']\n",24    "    message = \"\"\"Hello Admins,\n",25    "                 Users seem to be unsatisfied with the answer with the Id : {}\n",26    "                 Please take Required Action\"\"\".format(Aid)\n",27    "    smtpObj = smtplib.SMTP('localhost',1025)\n",28    "    smtpObj.sendmail(sender_mail, receivers_mail, message)"29   ]30  },31  {32   "cell_type": "code",33   "execution_count": 6,34   "id": "f551fe6c",35   "metadata": {},36   "outputs": [],37   "source": [38    "mail(5)"39   ]40  },41  {42   "cell_type": "code",43   "execution_count": null,44   "id": "547b47c0",45   "metadata": {},46   "outputs": [],47   "source": []48  }49 ],50 "metadata": {51  "kernelspec": {52   "display_name": "Python 3 (ipykernel)",53   "language": "python",54   "name": "python3"55  },56  "language_info": {57   "codemirror_mode": {58    "name": "ipython",59    "version": 360   },61   "file_extension": ".py",62   "mimetype": "text/x-python",63   "name": "python",64   "nbconvert_exporter": "python",65   "pygments_lexer": "ipython3",66   "version": "3.9.12"67  }68 },69 "nbformat": 4,70 "nbformat_minor": 571}72