954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Send mail in C code containing the "From", "To", "Subject", and "Message" parts

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...

francisprite
Newbie Poster
6 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

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

francisprite
Newbie Poster
6 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You