android - Sending email in kivy is not working -
i have written code below , save main.py , buildozer made apk file , deploy in phone crashes....why?
from kivy.app import app kivy.uix.button import button kivy.app import app kivy.lang import builder kivy.uix.floatlayout import floatlayout kivy.uix.boxlayout import boxlayout kivy.uix.label import label import smtplib fromaddr = "nisargjani20996@gmail.com" toaddrs = "nisargjani20996@gmail.com" msg = "why,oh why!" username = "myfrien@gmail.com" password = "password" server = smtplib.smtp('smtp.gmail.com:587') def callback(instance): server.starttls() server.login(username,password) server.sendmail(fromaddr, toaddrs, msg) server.quit() class testapp(app): def build(self): b=button(text='press me') b.bind(on_press=callback) return b if __name__ == '__main__': testapp().run()
Comments
Post a Comment