If sendmail is running and configured, you can use the following:
mailx -s "<subject>" foo@foo.com <enter>
<type your message here>
<CTRL><D> will end the message and display EOT and put you back at your prompt.
To include an attachment (like a log file for example) try this:
mailx -s "<subject>" foo@foo.com < 'path to file' <enter>
and it will send the email with the attachment inline to the email, not as an attachment.
If sendmail is running and not configured to send mail, you will need to configure /etc/mail/sendmail.cf. This is not a task to be taken lightly. I would recommend looking at
The basic configuration of sendmail willl include setting up the FQDN of the host (Update /etc/hosts file with domainname of the machine), Set the domain name of the host with domainname command, Update Dj$w and DS entries in the /etc/mail/sendmail.cf file and restart the sendmail.. Also, do not forget to have an MX record for your mail host in the DNS..
Regds,
- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
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.