aboutsummaryrefslogtreecommitdiff
path: root/src/web/emails.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 18:05:22 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 18:05:22 +0200
commitf501f7e1d2f6f3db6c7e8d320cc0c71d54cb42d1 (patch)
tree73d56a326b0de968ec3528db900ada9a9d54b71e /src/web/emails.py
parentFixed a bug for non-administor users. (diff)
downloadnewspipe-f501f7e1d2f6f3db6c7e8d320cc0c71d54cb42d1.tar.gz
newspipe-f501f7e1d2f6f3db6c7e8d320cc0c71d54cb42d1.tar.bz2
newspipe-f501f7e1d2f6f3db6c7e8d320cc0c71d54cb42d1.zip
use the dictionary **kwargs for the arguments of the functions send_*
Diffstat (limited to 'src/web/emails.py')
-rw-r--r--src/web/emails.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/web/emails.py b/src/web/emails.py
index 7be65995..9967fefb 100644
--- a/src/web/emails.py
+++ b/src/web/emails.py
@@ -49,16 +49,9 @@ def send(*args, **kwargs):
or a SMTP server.
"""
if conf.ON_HEROKU:
- send_postmark(to=kwargs.get("to"),
- bcc=kwargs.get("bcc"),
- subject=kwargs.get("subject"),
- plaintext=kwargs.get("plaintext"))
+ send_postmark(**kwargs)
else:
- send_smtp(to=kwargs.get("to"),
- bcc=kwargs.get("bcc"),
- subject=kwargs.get("subject"),
- plaintext=kwargs.get("plaintext"),
- html=kwargs.get("html"))
+ send_smtp(**kwargs)
def send_smtp(to="", bcc="", subject="", plaintext="", html=""):
"""
bgstack15