Provider 'email' does not accept multiple mail addresses
Magnati opened this issue ยท 4 comments
Magnati commented
According to the specs email.prepare_data of notifiers the parameter to
of provider email
should accept a list of addresses.
It accepts the list, but does not sent mails to all addresses.
Neither is the case when doing the job of list_to_commas
providing one string with ','join()
explicetely
In both cases only the first mail-address is receiving a mail
Here an example code.
import pathlib
import notifiers
def test_notify(mail_list):
p = notifiers.get_notifier("email")
# fill in your credentials
my_user = "my_user"
my_port = -1
my_host = "my_host"
status = p.notify(
to=mail_list,
username=my_user,
message="Testmessage",
subject="Test",
ssl=True,
port=my_port,
host=my_host,
html=True,
)
print(status)
if __name__ == "__main__":
mail_list = ['my.first@foo.com', 'my.second@bar.com']
test_notify(mail_list)
test_notify(",".join(mail_list))
welcome commented
Thanks for opening your first issue here! Be sure to follow the issue template! ๐๐๐
Magnati commented
Where do I find the issue template?
liiight commented
Thanks for opening this issue. I've been meaning to refactor the email provider, this is a good opportunity.
nico-stefani commented
Can i take this?