Git Product home page Git Product logo

Comments (2)

rosscdh avatar rosscdh commented on July 20, 2024 1

No probs thanks for providing a very nice api to something simple but that can be made really ugly :) Well done. Next time will be a PR, sorry was up to ears today!

from drymail.

skulltech avatar skulltech commented on July 20, 2024

Thanks for pointing out the bug! @rosscdh

You're right, message.prepare is kind of weak point of the architecture. Calling it inside __init__ would make it a lot more straightforward, but I wanted to let the user set various parameters themselves, even after instantiating the object. That was the motivation behind making a different function prepare and not call it in __init__ itself. But then again, this adds an extra step for the user, which is bad. That's why I made SMTPMailer check if the message is prepared or not before sending it. That way I was able to find a middle ground.

I'll push a commit soon to tackle this issue, I think I'll just initialize self.message to MIMEMultipart('mixed') in __init__ for now. But I need to find a more elegant method to deal with this, probably for a future release.

from drymail.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.