kootenpv / yagmail

Send email in Python conveniently for gmail using yagmail
MIT License
2.66k stars 265 forks source link

add context management for SMTP server #31

Closed jrkerns closed 8 years ago

jrkerns commented 8 years ago

so we can do things like:

with yagmail.SMTP(...) as yagserver:
    yagserver.send(...)

just as the real SMTP class has.

kootenpv commented 8 years ago

Nice one :) I just added a cleanup on delete, but this is even nicer.

kootenpv commented 8 years ago

Should merge before closing...

kootenpv commented 8 years ago

It built succesfully, but then it was closed, reopened and now the build does not pass. Very strange, but thanks a lot, context manager is a very good idea :)

jrkerns commented 8 years ago

Hmm. Well, it was the thought that counted, right? =)

kootenpv commented 8 years ago

@jrkerns In case it wasn't clear -- it has been merged anyway since the build was successful (though it doesn't show here now). Thanks :)

jrkerns commented 8 years ago

Oh, okay. Good project, keep it up!