raintank / worldping-api

Worldping Backend Service
Other
25 stars 18 forks source link

strip whitespace from email addresses #63

Closed woodsaj closed 7 years ago

woodsaj commented 7 years ago

if check alerting notification settings have a list of email addresses, we need to strip any leading/trailing white space, else the emails get rejected.

eg:

Oct  3 06:22:41 worldping-api-2-production worldping-api[22180]: 2016/10/03 06:22:41 [asm_amd64.s:1998 goexit()] [E] Async sent email 0 succeed, not send emails: anthony@*********;  awoods@******* err: 501 Syntax error

This is when the notification settings are set to:

"addresses": "anthony@******, awoods@******"

Currently the space after the comma causes sending of the emails to fail.