You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@manifoldcf.apache.org by Bisonti Mario <Ma...@vimar.com> on 2018/12/06 08:50:45 UTC

How to notify mail by SMTP

Hallo.
I would like to notify by mail the end of a job.
I use an smtp server but I am not able how to configure this.


I read https://lists.apache.org/list.html?user@manifoldcf.apache.org:dfr=2016-4-1|dto=2019-4-30:smtp but I understand that there is no way to configure with smtp now, isn’t it’

Thanks a lot Mario

R: How to notify mail by SMTP

Posted by Bisonti Mario <Ma...@vimar.com>.
Hallo.
I share a small script, if it could be useful for anyone,  to notify by mail if, some jobs are not in “Done” status.
I schedule it in the morning, one time a day.

checkjob.sh

#!/bin/bash

# Put on file jobstatuses
curl -u admin:admin http://localhost:8080/mcf-api-service/json/jobstatuses > /tmp/curljobstatuses.txt


# Count the number of jobs
numberjobs=$(grep -o -i '"job_id"' /tmp/curljobstatuses.txt | wc -l)

# Count the number of jobs in status “done”
numberdone=$(grep -o -i '{"_type_":"status","_value_":"done"}' /tmp/curljobstatuses.txt | wc -l)

# If number of job in “Done” status are not equal to the number of job, I send an email
if [ $numberdone -ne $numberjobs ]
then
echo "There are Manifold Job non completed" | mail -s "Job MCF non completed" mailreceiver@domain.net
fi

exit 0




Da: Bisonti Mario
Inviato: giovedì 6 dicembre 2018 14:14
A: user@manifoldcf.apache.org
Oggetto: R: How to notify mail by SMTP

Hi Karl.
Yes, I created a “notification connection” but I haven’t the protocol SMTP available.
I see only “Host name” “Port” …
[cid:image001.jpg@01D4ACF5.938021C0]


Da: Karl Wright <da...@gmail.com>>
Inviato: giovedì 6 dicembre 2018 13:49
A: user@manifoldcf.apache.org<ma...@manifoldcf.apache.org>
Oggetto: Re: How to notify mail by SMTP

Hi Mario, there is an email notification connector.  Have you tried to configure that?

On Thu, Dec 6, 2018, 3:50 AM Bisonti Mario <Ma...@vimar.com> wrote:
Hallo.
I would like to notify by mail the end of a job.
I use an smtp server but I am not able how to configure this.


I read https://lists.apache.org/list.html?user@manifoldcf.apache.org:dfr=2016-4-1|dto=2019-4-30:smtp<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apache.org%2Flist.html%3Fuser%40manifoldcf.apache.org%3Adfr%3D2016-4-1%257Cdto%3D2019-4-30%3Asmtp&data=01%7C01%7CMario.Bisonti%40vimar.com%7C79a3838783f14b2fbdb008d65b795c31%7Ca1f008bcd59b4c668f8760fd9af15c7f%7C1&sdata=fiJxEztTRvxtyE63sjX9tkIU3X1j4Mh2SUQT2lP%2Fd%2Fk%3D&reserved=0> but I understand that there is no way to configure with smtp now, isn’t it’

Thanks a lot Mario

Re: How to notify mail by SMTP

Posted by Karl Wright <da...@gmail.com>.
I don't actually know much about this connector, and its contributor did
not provide documentation.  Hopefully somebody who knows more will respond.


On Thu, Dec 6, 2018, 8:14 AM Bisonti Mario <Mario.Bisonti@vimar.com wrote:

> Hi Karl.
>
> Yes, I created a “notification connection” but I haven’t the protocol SMTP
> available.
>
> I see only “Host name” “Port” …
>
>
>
>
>
> *Da:* Karl Wright <da...@gmail.com>
> *Inviato:* giovedì 6 dicembre 2018 13:49
> *A:* user@manifoldcf.apache.org
> *Oggetto:* Re: How to notify mail by SMTP
>
>
>
> Hi Mario, there is an email notification connector.  Have you tried to
> configure that?
>
>
>
> On Thu, Dec 6, 2018, 3:50 AM Bisonti Mario <Mario.Bisonti@vimar.com wrote:
>
> Hallo.
>
> I would like to notify by mail the end of a job.
>
> I use an smtp server but I am not able how to configure this.
>
>
>
>
>
> I read
> https://lists.apache.org/list.html?user@manifoldcf.apache.org:dfr=2016-4-1|dto=2019-4-30:smtp
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apache.org%2Flist.html%3Fuser%40manifoldcf.apache.org%3Adfr%3D2016-4-1%257Cdto%3D2019-4-30%3Asmtp&data=01%7C01%7CMario.Bisonti%40vimar.com%7C79a3838783f14b2fbdb008d65b795c31%7Ca1f008bcd59b4c668f8760fd9af15c7f%7C1&sdata=fiJxEztTRvxtyE63sjX9tkIU3X1j4Mh2SUQT2lP%2Fd%2Fk%3D&reserved=0>
> but I understand that there is no way to configure with smtp now, isn’t it’
>
>
>
> Thanks a lot Mario
>
>

R: How to notify mail by SMTP

Posted by Bisonti Mario <Ma...@vimar.com>.
Hi Karl.
Yes, I created a “notification connection” but I haven’t the protocol SMTP available.
I see only “Host name” “Port” …
[cid:image002.jpg@01D48D6D.F40AFEE0]


Da: Karl Wright <da...@gmail.com>
Inviato: giovedì 6 dicembre 2018 13:49
A: user@manifoldcf.apache.org
Oggetto: Re: How to notify mail by SMTP

Hi Mario, there is an email notification connector.  Have you tried to configure that?

On Thu, Dec 6, 2018, 3:50 AM Bisonti Mario <Ma...@vimar.com> wrote:
Hallo.
I would like to notify by mail the end of a job.
I use an smtp server but I am not able how to configure this.


I read https://lists.apache.org/list.html?user@manifoldcf.apache.org:dfr=2016-4-1|dto=2019-4-30:smtp<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apache.org%2Flist.html%3Fuser%40manifoldcf.apache.org%3Adfr%3D2016-4-1%257Cdto%3D2019-4-30%3Asmtp&data=01%7C01%7CMario.Bisonti%40vimar.com%7C79a3838783f14b2fbdb008d65b795c31%7Ca1f008bcd59b4c668f8760fd9af15c7f%7C1&sdata=fiJxEztTRvxtyE63sjX9tkIU3X1j4Mh2SUQT2lP%2Fd%2Fk%3D&reserved=0> but I understand that there is no way to configure with smtp now, isn’t it’

Thanks a lot Mario

Re: How to notify mail by SMTP

Posted by Karl Wright <da...@gmail.com>.
Hi Mario, there is an email notification connector.  Have you tried to
configure that?

On Thu, Dec 6, 2018, 3:50 AM Bisonti Mario <Mario.Bisonti@vimar.com wrote:

> Hallo.
>
> I would like to notify by mail the end of a job.
>
> I use an smtp server but I am not able how to configure this.
>
>
>
>
>
> I read
> https://lists.apache.org/list.html?user@manifoldcf.apache.org:dfr=2016-4-1|dto=2019-4-30:smtp
> but I understand that there is no way to configure with smtp now, isn’t it’
>
>
>
> Thanks a lot Mario
>