Nick Satterly
2a6632b78f
Fix multiple linting errors
2023-03-21 00:15:34 +01:00
Jérôme Revillard
106e3e2890
fix: Mailer: more debug messages ( #368 )
...
This will help to detect issues
2021-10-18 22:21:10 +02:00
matmoscicki
aacc02db91
fix(mailer): Fix checking multiple fields. ( #347 )
...
According to the documentation, if multiple fields are defined, they
must all match in order to send an email.
2021-04-18 21:19:36 +02:00
蔡泽人
a7516711c2
fix: update mailer.py ( #342 )
2021-04-18 21:15:07 +02:00
Matthew Jenkins
2a8f448a65
feat: mailer pickable sevs ( #336 )
...
* add default option & use it
* update readme
2021-01-06 23:18:29 +01:00
Nick Satterly
614aa32efe
build: use github actions for CI/CD ( #339 )
2021-01-06 01:23:41 +01:00
Matthew Jenkins
2efa8e1e47
style(mailer): add new line to warning message ( #334 )
...
line ending
2020-12-18 10:26:41 +01:00
Nick Satterly
bc0de15765
Update READMEs
2020-11-20 22:39:32 +01:00
Nick Satterly
4387599071
Add comment about required auth scope
2020-06-07 21:43:29 +02:00
Nick Satterly
b66f140b46
Update travis CI config and add tests ( #316 )
2020-04-18 21:14:40 +02:00
Nick Satterly
4d0961a003
Run pylint in build pipeline ( #312 )
...
* Run pylint in build pipeline
* Only report on pylint errors and fix them
2020-02-19 22:45:42 +01:00
Yann Cézard
276ef31544
[mailer] Do not try to send an email to no recipient (empty contacts list) ( #286 )
...
* Do not try to send an email to no one.
* Fix list format for empty list (mail_to).
* Implicit length test.
2019-07-30 13:12:50 +02:00
Yann Cézard
34ce05bd97
Add SIGTERM signal handling (useful when used in Docker). ( #285 )
2019-07-29 20:18:11 +02:00
Nick Satterly
74834e6b66
[alerta-mailer] Fix HTML emails ( #262 )
2019-05-17 14:57:33 +02:00
Jan Sokol
12a5f6be3e
Make AMQP queue options configurable ( #226 )
2018-11-22 18:59:19 +01:00
Yann Cézard
6063d408d6
Fix parsing multiple config files in alerta-mail (mailer.py). ( #189 )
...
* Fix parsing multiple config files.
* Fix missing parenthesis + fix path to alerta.rules.d like mentionned in README.md.
* Extend the list, do not append to it !
* Return empty tupe to permit the use of list.extend later.
* Bump to version 5.2.0
2018-04-29 21:57:53 +02:00
Yann Cézard
d1b9ba02cb
Fix dictionary changed size during iteration ( #188 )
...
* Fix templates (iteritems doesn't exist in Py3, items works for both version).
* Revert "Fix templates (iteritems doesn't exist in Py3, items works for both version)."
This reverts commit cec394bd3d
.
* Fix runtimeerror when modifying dict in loop on itself.
2018-04-21 15:54:23 +02:00
Yann Cézard
29fe74fe29
the dict.iteritems doesn't exist anymore un py3. ( #187 )
2018-04-21 15:53:21 +02:00
Nick Satterly
e52f4f9a15
Update mailer for version 5
2017-11-16 00:11:40 +00:00
Nick Satterly
5e004e9c5f
Update urlmon for version 5
2017-11-16 00:01:19 +00:00
Nick Satterly
4d38cea05f
Bump version of mailer to 5.0.2
2017-10-10 19:51:22 +01:00
Nick Satterly
a5f8a11b08
Fix mailer config file read and None type
2017-10-10 19:49:52 +01:00
Nick Satterly
f5212de079
Update alerta-mailer for v5 API and python 3
2017-10-08 21:28:08 +01:00
John Siegrist
2264371d7d
Implemented suggestion: make setting smtp_username more consistent with the rest of the options.
2017-07-17 13:14:54 +10:00
John Siegrist
0dc5ad6301
Added smtp_username configuration variable to enable using mailer with email delivery service sendgrid.
2017-07-14 11:26:10 +10:00
Nick Satterly
1849db2ad0
Make everything MIT license
2017-05-10 10:09:13 +01:00
marksmyth
ff60e8aefb
Fix cross platform compatiblity for windows
...
As per python docs os.uname is only available on Unix like systems,
should be plaform.uname for cross compatibility.
https://docs.python.org/dev/library/os.html#os.uname
2017-03-06 10:04:13 +00:00
Nick Satterly
5c7af0ca4d
Update mailer README
2016-12-10 15:03:12 +00:00
Nick Satterly
f8b8ccdb02
Merge pull request #68 from int32bit/master
...
Fix codec error if the text includes non-ascii charators
2016-10-28 08:38:56 +01:00
int32bit
1a9aa235d4
Fix codec error if the text include non-ascii
...
In order to be compatible with multiple languages,
the text(the subject included) in the message body
should be encoded in utf-8 to avoid `UnicodeEncodeError`
when we call msg.as_string(). It seems that the subject field
in line 279 misses it, I fixed it with `Header` wrapper.
2016-10-28 14:43:43 +08:00
Nick Satterly
e9087d9704
Merge pull request #66 from msupino/master
...
dont die on api timeout
2016-10-12 16:26:05 +01:00
root
bd451f3e0c
dont die on api timeout
2016-10-12 15:18:41 +00:00
int32bit
4b80a5235a
Add SMTP over SSL support
2016-10-12 15:01:08 +08:00
root
dfca8af1e5
fixed import name to alertaclient
2016-09-15 09:12:46 +00:00
Moises Silva
fbac2aec9f
Fix alerta mailer routing bug causing mails to be sent to everyone
...
This bug was introduced during the json routing rules refactoring.
The global OPTIONS['mail_to'] setting was being modified instead of
using a copy causing every new alert notification to start with the
notification list from the previous notification instead of the
original global settings.
I've also updated the tests to be more resilient to internal
implementation changes and focus on testing the input/output of
the send_email() function. The function now returns the email
message sent and the list of contacts on success or None on failure.
2016-06-07 19:02:22 -04:00
Joao Mesquita
bc42d21173
Implement the ability to match against other attrs
...
Add the ability to match regex to list objects as well
2016-05-13 17:58:46 -03:00
Joao Mesquita
11e27137a2
Add exclude keyword to rules
...
By setting the exclude keyword, contacts will be cleared and replaced
with current rule's contact list.
2016-05-13 14:21:22 -03:00
Joao Mesquita
84719c4c48
Minor fixes to validation
2016-05-13 00:40:25 -03:00
Joao Mesquita
0c26ab5c8d
Move email rules to more flexible JSON format
...
* alerta-mailer now has unit tests using py.test
* rules should be ported to new JSON format
2016-05-12 23:47:02 -03:00
Angel Velasquez
eb14f1afb6
Changing eval for getattr because security reasons, spotted by @jmesquita
2016-05-12 16:32:33 -03:00
Angel Velasquez
af3dd1da24
Increase the version number due this bugfix
2016-03-04 16:48:48 -05:00
Moises Silva
084ecbd646
Fix contact address calculation to avoid global mutation
...
The global options contacts was being modified which lead
to every single subsequent email to use the mutated list
of contacts.
We now make a local copy and re-calculate the contacts
every time before we send an alert email.
2016-03-04 13:28:31 -05:00
Angel Velásquez
95871da830
Add support for multiple config files, and refactor of the notifications
2016-03-02 17:35:07 -03:00
Angel Velásquez
46b61b5b26
Fix README styles
2016-02-23 08:34:43 -03:00
Angel Velásquez
78e0cb43d5
Add notifications feature for more customized options for mails.
2016-02-23 08:23:27 -03:00
Nick Satterly
98316560ae
Bump version of alerta-mailer to 3.1.0
2016-02-22 12:06:09 +00:00
Angel Velásquez
91af1824ac
Fix html emails and add a switch + template for
...
choose between html or plain text emails
2016-02-22 05:27:38 -03:00
Angel Velásquez
bc82251df2
Clean up the mailer and fix some pep8 complaints
2016-02-18 12:41:32 -03:00
Nick Satterly
3a507dee5c
Merge pull request #18 from sangoma/mailer-template-config
...
Make the mailer template location and the mail subject configurable
2016-01-12 01:17:54 +00:00
Moises Silva
ee9d048827
Make the mailer template location and the mail subject configurable
2016-01-11 20:05:19 -05:00