Issues with binding text input with function in kivy

17 views
Skip to first unread message

Nisarg Jani

unread,
May 21, 2015, 3:23:20 AM5/21/15
to kivy-...@googlegroups.com
i am trying to send email and taking input from user in kivy android app..but i don't know how to attach the text in put with email function...please someone help me

this is my code :

import smtp

fromaddr = 'm...@gmail.com'

msg = "BOOM BOOM "*10

uname = 'm...@gmail.com'

pword = 'my password'

msg='testing email'



# i have passed text value in Send_email function...text value will be take by user


def Send_email(text):

     server = smtplib.SMTP('smtp.gmail.com:587')
   
    server.ehlo()
   
    server.starttls()
   
    server.login(uname,pword)
   
    server.sendmail(fromaddr, text, msg)


#  when i enter email id in text input and press button email must be sent to that email id...i know i have made mistake in below code..someone please correct it...

class TestApp(App):

        def build(self):
           
            bx=FloatLayout(size=(300, 300))
          
            t=TextInput(font_size=20,size=(470,39),size_hint=(None,None),text='Enter receiver email id here ',pos=(0,580),multiline=False)
            b=Button(text="SEND EMAIL BOMB",font_size=18,background_color=[1,1,3,1],size=(250,100),size_hint=(None,None),pos=(0,470))
            b.bind(on_release=callback)           
           
            bx.add_widget(t)
            bx.add_widget(b)
           
           
            return bx


if __name__ == '__main__':
    TestApp().run()




please !!! any help will be appricaiated...help me
Reply all
Reply to author
Forward
0 new messages