I can not send an email to multiple email addresses by using notifications-client even though the log says “Notifications Emailer.Successfully sent email”.
So it makes me think that notifications-client doesn't treat multiple email addresses correctly.
EXPECTED BEHAVIOR
You can send an email to multiple email addresses.
ACTUAL BEHAVIOR
You can not send an email to multiple email addresses.
STEPS TO REPRODUCE
Install Postfix
Confirm you can send an email to 1 email address by using Postfix
$ echo "This is the body of the email" | mail -s "This is the subject line" youraddress@yahoo.com
Confirm you can send an email to multiple email addresses by using Postfix
Both white space and comma as delimiter work as expected.
$ echo "This is the body of the email" | mail -s "Space - This is the subject line" youraddress@yahoo.com youraddress2@yahoo.com
$ echo "This is the body of the email" | mail -s "Comma - This is the subject line" youraddress@yahoo.com, youraddress2@yahoo.com
Confirm you can send an email to 1 email address by using notifications-client.
Edit the bash script which is in /var/vcap/jobs/send-email/bin/run in mysql instance, and run the edited script like this:
/var/vcap/packages/notifications-client/bin/notifications-client \
--uaaDomain="uaa.YOURDOMAIN.com" \
--notificationsDomain="notifications.YOURDOMAIN.com" \
--uaaAdminClientUsername="admin" \
--uaaAdminClientSecret="YOUR-ADMIN-SECRET" \
--uaaClientUsername="notifications" \
--uaaClientSecret="YOUR-UAA-SECRET" \
--toAddress="youraddress@yahoo.com" \
--subject="SINGLE EMAIL - [YOURDOMAIN.com][cluster_identifier] P-Mysql Alert 100" \
--bodyHTML="{alert-code 100}<br /> Hello, just wanted to let you know that the MySQL node/cluster has gone down and has " \
--kindID="$p-mysql" \
--skipSSLCertVerify="true" \
>>/var/vcap/sys/log/mysql/notifications-client.combined.log 2>/var/vcap/sys/log/mysql/notifications-client.combined.log
Confirm you can not send an email to multiple email addresses by using notifications-client.
Both white space and comma as delimiter don't work.
Command:
/var/vcap/packages/notifications-client/bin/notifications-client \
--uaaDomain="uaa.YOURDOMAIN.com" \
--notificationsDomain="notifications.YOURDOMAIN.com" \
--uaaAdminClientUsername="admin" \
--uaaAdminClientSecret="YOUR-ADMIN-SECRET" \
--uaaClientUsername="notifications" \
--uaaClientSecret="YOUR-UAA-SECRET" \
--toAddress="youraddress@yahoo.com, youraddress2@yahoo.com" \
--subject="COMMA - [YOURDOMAIN.com][cluster_identifier] P-Mysql Alert 100" \
--bodyHTML="{alert-code 100}<br /> Hello, just wanted to let you know that the MySQL node/cluster has gone down and has " \
--kindID="$p-mysql" \
--skipSSLCertVerify="true" \
>>/var/vcap/sys/log/mysql/notifications-client.combined.log 2>/var/vcap/sys/log/mysql/notifications-client.combined.log
ISSUE SUMMARY
I can not send an email to multiple email addresses by using
notifications-client
even though the log says “Notifications Emailer.Successfully sent email”. So it makes me think thatnotifications-client
doesn't treat multiple email addresses correctly.EXPECTED BEHAVIOR
You can send an email to multiple email addresses.
ACTUAL BEHAVIOR
You can not send an email to multiple email addresses.
STEPS TO REPRODUCE
Both white space and comma as delimiter work as expected.
notifications-client
.Edit the bash script which is in
/var/vcap/jobs/send-email/bin/run
in mysql instance, and run the edited script like this:notifications-client
.Both white space and comma as delimiter don't work.
Command:
Log:
NOTES