I'm having issues with a third level Toplevel in tkinter, that is to say having a toplevel popup from another Toplevel.

self.emailbttn= Button(self, text='Email', command=self.clientchooser)

    def clientchooser(self):

    def client_choose():
        global client
        client.title=('Choose Email')

class Client(Frame):
    '''Choose Email Client'''
    def __init__(self,master):
        super(Client, self).__init__(master)

    def create_widget(self):
        self.notice=Label(self, text='Choose your Email Type')
        self.gmail=Button(self, text='GMAIL', command=self.gopen)

    def gopen(self):
        import webbrowser

And yes I'm aware that Gmail is more properly webmail as opposed to a mail client. On a related note is there a way to have the To: field automatically filled upon opening a message composition page in gmail? I'm sure there's a much better way to do email than the way I'm doing it, but I suppose the real issue at hand for me is the fact that the third level toplevel is opening WAY too small and the title doesn't show.

Recommended Answers

All 6 Replies

found it, I had client.title#and geometry#=() but it's just client.title()

I suppose now on to having a better way to do email, is there one?

I've tried that a few times and gotten socket errors for local host. Also does the From: field need to be a valid email address?

I think your computer has not smtp server running but you must put in your Internet Service providers SMTP server information. From field could probably be faked, but replies would not arrive OK. Like some companies or mailing lists no_reply.... Email addresses. I try to take the code and let it transmit itself to you now that I dig up some stuff for gmail from net.

I got it, wow, that worked well from you. Let's see if I can do that. How would I find my ISP's SMTP server info?

See the code snippet I posted. There was some issue with bytes trying to send the code of the program from Python3, so in snippet there is only simple built in string sent instead. Subject is left incorrectly sam as in message I sent to you. The program has the information how to use gmails SMTP, not ISP specific one.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.