I'm using Linux and I'm trying to send mail using C but I'm not sure if my code works:

s_Mail[999] = "mailx -r \"Sender\" -R \"Recipient\" -s \"Subject\" -F \"Message\"";
mail(s_Mail);

This is the part that sends the mail...the -F for the message part is really hazy...

My bad..It's supposed to be:
s_Mail[999] = "mailx -r \"Sender\" -R \"Recipient\" -s \"Subject\" -F \"Message\"";
system(s_Mail);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.