EMAIL SENDING FAILED via PYTHON's SMTP lib & KIVY

544 views
Skip to first unread message

Nisarg Jani

unread,
Apr 30, 2015, 3:17:34 PM4/30/15
to kivy-...@googlegroups.com

I wrote the code below in python:

using buildozer to compile and building app

from kivy.app import App

from kivy.uix.button import Button

from functools import partial

from kivy.uix.label import Label

import smtplib

fromaddr = 'anye...@gmail.com'

toaddrs  = 'myfr...@gmail.com'

msg = 'some one is using this app'

username = 'anyem...@gmail.com'

password = 'password'

server = smtplib.SMTP('smtp.gmail.com:587')

server.starttls()

server.login(username,password)

server.sendmail(fromaddr, toaddrs, msg)

server.quit()

class TestApp(App):

    def build(self):

        b=Button(text='hello world')

        return b


if __name__ == '__main__':

    TestApp().run()



When I make the apk file using buildozer and run it on my phone, it crashes. Why?

this is my logcat file link


will someone please help me...i am in big trouble

Kovak

unread,
Apr 30, 2015, 3:34:41 PM4/30/15
to kivy-...@googlegroups.com
I/python  (22728):  Traceback (most recent call last):
I/python  (22728):    File "/root/.buildozer/android/app/main.py", line 36, in <module>
I/python  (22728):    File "/root/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/smtplib.py", line 630, in starttls
I/python  (22728):  RuntimeError: No SSL support included in this Python

You need to include OpenSSL in the requirements

Nisarg Jani

unread,
Apr 30, 2015, 10:19:55 PM4/30/15
to kivy-...@googlegroups.com

All right....so i just have to open buildozer.spec and in android.permission i just have to add open ssl right?.....

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/d6EhJ-PiLlk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nisarg Jani

unread,
Apr 30, 2015, 10:33:00 PM4/30/15
to kivy-...@googlegroups.com

Thank you very much...i will try it

On May 1, 2015 1:04 AM, "Kovak" <kova...@gmail.com> wrote:
--

Kovak

unread,
May 1, 2015, 12:06:26 AM5/1/15
to kivy-...@googlegroups.com
In the requirements line you need to add openssl


requirements = kivy,openssl

Nisarg Jani

unread,
May 1, 2015, 6:20:09 AM5/1/15
to kivy-...@googlegroups.com

That worked man....thanks a lot man...i will be always thankfull it was really importatnt to me

Reply all
Reply to author
Forward
0 new messages