Exemplo n.º 1
0
 def confirmEmailSend(self):
     msg = messagebox.askquestion('Send Email', 'Are you sure to send email', icon='warning')
     if msg == 'yes':
         re_email = self.email_entry.get()
         print(re_email.strip())
         db = Database()
         querys = db.fetch_today()
         db.db_close()
         pdf = Pdf()
         pdf.get_pdf(querys)
         send_email = EmailSend(re_email.strip())
         send_email.send_email()
         messagebox.showinfo('Done','Your email has been sent')
         self.emailWin.quit()
         self.emailWin.destroy()
         
     else:
         self.emailWin.quit()
         self.emailWin.destroy()
         messagebox.showerror('Cancelled','Your email is not forwarded')