Command to send mail from Shell

23 views
Skip to first unread message

Ana MB

unread,
Sep 6, 2017, 3:08:17 AM9/6/17
to Jenkins Users
Hi guys!!

 I want to send a mail when the files match condition is true, but I've tried with the following commands with no luck:

  1. mailx -s 'Test Mail from Jenkins' -a **/my_file.csv m...@email.com                   but it returns failure "mailx: not found"
  2. sendmail -f sen...@some.where -t rece...@some.place -m -a file1.csv                 and returns "sendmail: not found"
  3. mpack -s "Subject here" file.csv us...@example.com and returns "mpack: not found"           and returns "mpack: not found"

What Am I doing wrong?

Thanks so much.....

Diptiman Adak

unread,
Sep 6, 2017, 3:39:06 AM9/6/17
to Jenkins Users
Probably the slave does not have the packages installed.

Ana MB

unread,
Sep 6, 2017, 3:47:00 AM9/6/17
to Jenkins Users
How could I chek it?
Thanks!

Ana MB

unread,
Sep 6, 2017, 4:29:00 AM9/6/17
to Jenkins Users
If I search for "sendmail" in my server where Jenkins is installed, I find;


deploy@DS0:~/selenium$ sudo find / -name "sendmail"
/var/lib/docker/aufs/diff/3adcc7d98df145e2238d36c153978c01bb9795e9454becd7dc68c4779afeaac5/usr/sbin/sendmail

So, I guess, I could use "sendmail" perfectly.... couldn't I?

Thanks so much!!


El miércoles, 6 de septiembre de 2017, 9:39:06 (UTC+2), Diptiman Adak escribió:

Ana MB

unread,
Sep 6, 2017, 6:17:46 AM9/6/17
to Jenkins Users
I fixed it installing postfix.

Thanks!
Reply all
Reply to author
Forward
0 new messages