Spaces:
Running
Running
Commit
·
8489214
1
Parent(s):
8bcd009
Update app.py
Browse files
app.py
CHANGED
@@ -116,7 +116,22 @@ def send_email(email,msg,stdate):
|
|
116 |
server.quit()
|
117 |
st.success("Email sent successfully!")
|
118 |
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
def main():
|
122 |
|
@@ -176,7 +191,7 @@ def main():
|
|
176 |
|
177 |
if st.button("Send Email"):
|
178 |
email="[email protected]"
|
179 |
-
|
180 |
|
181 |
|
182 |
if __name__ == '__main__':
|
|
|
116 |
server.quit()
|
117 |
st.success("Email sent successfully!")
|
118 |
|
119 |
+
#yagmail
|
120 |
+
def send_yagmail(email,msg,stdate):
|
121 |
+
import yagmail
|
122 |
+
#receiver = email
|
123 |
+
#body = "Hello there from Yagmail HF"
|
124 |
+
#filename = "document.pdf"
|
125 |
+
sender_email = "[email protected]"
|
126 |
+
sender_password = "ibxccfsdcyzeittm"
|
127 |
+
yag = yagmail.SMTP(sender_email,sender_password)
|
128 |
+
yag.send(
|
129 |
+
to=email,
|
130 |
+
subject="Horoscope Insights of " + stdate,
|
131 |
+
contents=msg
|
132 |
+
#attachments=filename,
|
133 |
+
)
|
134 |
+
st.success("Yagmail sent successfully!")
|
135 |
|
136 |
def main():
|
137 |
|
|
|
191 |
|
192 |
if st.button("Send Email"):
|
193 |
email="[email protected]"
|
194 |
+
send_yagmail(email,prediction,strtime)
|
195 |
|
196 |
|
197 |
if __name__ == '__main__':
|