Not getting email notice from MAIL_ADDRESS

  • The Cylc version 7.8.8.

attempting to notify in case of ‘failed’ using

[cylc]

[[environment]]
  MAIL_ADDRESS=OtherUser1,OtherUser2

[[events]]
  mail events = failed

$USER gets a notice of with:
Subject: !!cylc alert!! suite cylc-test failed

the folks on MAIL_ADDRESS do not.

folks on MAIL_ADDRESS do receive email from command line with:

echo test-00 | mail -s test-00 OtherUser1

is this method viable?

Cylc supports configuring email addresses with the “mail to” configurations:

[cylc]
    [[events]]
         mail to = me, OtherUser1, OtherUser2
[runtime]
    [[root]]
        [[[events]]]
             mail to = me, OtherUser1, OtherUser2

However, Cylc does not support configuring email addresses via the MAIL_ADDRESS environment variable.

I think you might be looking at this example in the docs:

https://cylc.github.io/cylc-doc/7.9.3/html/appendices/command-ref.html?highlight=mail_address#email-task

The trick which makes this example work is the configuring of a custom event handler script which looks at that environment variable:

failed handler = cylc email-task

i successfully used the ‘trick’ mentioned above, even though it seems to be obsolete.

however i could not get ‘mail to’ method to work.

You can try running your workflow using the --debug option to see what’s happening.
For example. if I run this workflow:

[scheduling]
    [[dependencies]]
        graph = root
[runtime]
    [[test]]
        script = "true"
        [[[events]]]
            mail events = succeeded
            mail to = user1, user2

then I can see an entry like this in log/suite/log:

DEBUG - ['mail', '-s', '[1/test/01 succeeded] test-email', '-r', 'notifications@host', 'user1, user2']

thank you dp.
it worked…