Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

executing mail from C program

Status
Not open for further replies.

cp2000

Technical User
Dec 31, 2002
81
US
I've run up against a strange one here.

I have a user that is using the /bin/mail commandline on a Solaris 8 system to send mail. She is doing this from with in a C program.

When I try it from the commandline as root OR as a different user it always recognises the correct sender. When the C program does it mail makes the sender 'nobody'.

enlighten me please...
 
When a prog or script is called from the command line it gets data from the env vars. When a prog calls another prog, data is pushed and pulled from the stack. You would be able to do the same thing as a script if you put all that info on the command line. The drawback is, is that you are limited to how much you can put on the command line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top