Home · News · Articles · Forum · Downloads · Search Your IP: 38.103.63.58 · Today: Tuesday, January 06, 2009
Main Menu
Home
News
Articles
- General
- Common Software
- Tips & Tricks
- Networking
- Multimedia
- Operation Systems
- Hardware
- Programming
- Security
- Configs
- CMS
Forum
Downloads
Gallery
Search
FAQ
Links
Ping us
Top 10 Article Posters
empty 37
nemo 3
linuxGuru 1
scary 1
tashak 1
siluni 1
Poll
What OS are you using?

Linux

*BSD

Solaris

Mac OS

Windows

Other

You must login to vote.
How to send e-mail over SSH
How to send e-mail over SSH.

This article will show you how to send e-mails using the command mail in unix-like operation systems. It's tested and working on Linux and FreeBSD.

This article will show you how to send e-mails using the command mail or sendmail.

1. Sending e-mail using the mail command:
The requirements are pretty simple. You just need to have sendmail installed. Usually it comes with the most unix-like operation systems.
Let's see what you need to send an e-mail using the command mail:
The command can be executed as any active user on the box. Here is an example for the mail sending:
Code:


Once you execute this it will give you a blank space where you can insert the text for your e-mail.
When you finish writing the e-mail you can stop the input mode with the key combination CTRL + D.
As soon as you press CTRL + D it will ask you for Cc:. If you want to send the e-mail to more than one recepient you can use this field and add the second e-mail address.
Note: You can add more than one e-mail address in the Cc: field separated by comma.
Here is an example:
Code:


This will send the e-mail to all defined e-mail addresses. There is other way to send the e-mail to multiple e-mail addresses. You can insert the e-mail addresses in the command like this:
Code:


This will be sent to all defined e-mail addresses as well.

2. Sending text file as an e-mail:
It is pretty simple to send a text file to your e-mail over the mail command.
You need to use this syntax:
Code:


This command will directly send the file contect to the desired e-mail(s) address(es).
Here is an example if you want to send the your samba configuration file to 2 e-mail addresses:
Code:

Note: This is 1-line command

That's it! Contgratilations you know how to send e-mails over console ;)

Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.
Ratings
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Search

Enter words:


Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Users Online
Guests Online: 1
No Members Online
Registered: 56
Newest: Grantt721
Random Gallery Image
ntop
ntop
Screenshots
Friends
DJs Place
Fresh Flash Games
Free Wallpapers
PHP Scripts
Levski
Flash Games
HouseFreaks.Net
Improvements
Bookmark and Share
News Feeds
Article Feeds
Forum Feeds
Spam Poison
Valid CSS!
OSGuides.net 2007 - 2008 Creative Commons License.