You can write a C program that
1) reads data from the user and writes it to a file. You write the C code or just fork and exec 'vi'.
2) exec the mail command ,redirecting the input from the file written in (1)
otherwise you can directly exec the mail command and compose the mail over there itself.
Writing a complete mailer application is a much more complex task.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.