Problem solve Get help with specific problems with your technologies, process and projects.

How do I send email from UNIX machines to a corporate mail ID?

Can I send email from UNIX machines to a corporate mail ID by using the mail/mailx command?
Absolutely. Here's how it's done. First type in

# mail testuser@yahoo.com

At that point you will be prompted for a subject.

Subject: just checking in

Hit the enter key and then type your message hitting enter until you get to your last line, where you are finished. Type in a . (period) in the first column. At that point, you will be prompted as to whether or not you wish to CC: anyone. If you do not, hit enter and that is all there is to it.

On the back-end, your system must be configured to send mail. More then likely you are running sendmail and you don't even know it. Type this in:

# ps –ef | grep sendmail

Obviously, you must also be connected to the Internet. Trying pinging a web-site;

# ping www.oracle.com.

If you see a response, that should tell you that you are connected. If not, you'll need to work with your network and/or security team to determine…

Mail and mailx are very similar; if you're working on a Solaris system, you should use mailx instead.

This was last published in September 2007

Dig Deeper on Linux servers

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.