Comments (2)
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drymail.