0

I use a system() call to mailutils to send email alerts from a c++ program (running on a Debian Linux machine). Is there a way for my program to determine success or failure?

  • What exactly do you mean by "success or failure"? –  Sep 20 '17 at 19:01
  • Let's say the internet was down and the mail did not send. How might my program know to keep trying? – user8448384 Sep 20 '17 at 19:02
  • That depends on what your mail client can return as an indicator - the system() library function returns the exit status of the program it executes, which you can test in your C++ code. –  Sep 20 '17 at 19:04
  • Ahhhh... I didn't know that. Will have to try, thanks! – user8448384 Sep 20 '17 at 19:18

0 Answers0