I am running linux. This problem maybe implemented many times over. I am not hitting right google search term. I need a way to send email from my c program, if that program fails to excute some other part of the code.

Any gurus like to shed some light on how and what to do?

Thanks.

system("mailx -s "hello" homework@live.in");