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?
Asked
Active
Viewed 48 times
0
-
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