LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2010, 07:16 PM   #1
tailinlinux
Member
 
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Blog Entries: 3

Rep: Reputation: 25
How to send message via terminal in windows or linux?


How to send message via terminal in windows or linux?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-06-2010, 07:57 PM   #2
wideyes
LQ Newbie
 
Registered: Dec 2009
Posts: 19

Rep: Reputation: 0
That's a bit vague. To whom do you want to send the message? Is your recipient on a desktop pc?
 
Old 12-08-2010, 04:46 AM   #3
mikewc02
LQ Newbie
 
Registered: Jan 2010
Location: St. Louis, MO
Distribution: Arch Linux
Posts: 12

Rep: Reputation: 3
As wideyes mentioned, this question is quite vague. Also, Windows and Linux work completely differently. (Please note, though, that this is a Linux-specific forum.)

In Linux, if you are attempting to broadcast a message out to all other users logged into a particular machine, you can do so with the "wall" command.

Example:
Code:
# wall Text of your message
The "write" command does the same thing, but will allow you to send target the message to a particular user, rather than broadcasting out to everyone.

Sending messages to users in Windows is done through Task Manager. Task Manager has a tab called "Users" that will allow you to select a user who is currently logged in and send them a pop-up message by selecting the "Send Message" button at the bottom.

Now... if you're talking about sending emails from the command line, that can be done easily if you already have a mail agent (like Sendmail) installed and configured. To send an email with Sendmail, you would do it as follows.

Code:
# mail -s "Subject of email" recipient@theirdomain.com
After this, your cursor will move to a blank line. You will type the text of your email here, just as you would in a text editor. When completed, hit Ctrl+D. You'll be presented with a CC: line, and if you need to copy anyone, you will list their email address here. (If not, just leave it blank.) When you hit enter again, your message will be sent.

If you don't have Sendmail, Postfix, or whatever installed, you can also send an email by establishing a telnet connection to your mail server on port 25. Below is an example of me doing so through my ISP's mail server. (Email and IP addresses in output have been changed. The text in bold is what I typed.)

Code:
[mike@myserver ~]$ telnet mail.charter.net 25
Trying 209.225.8.224...
Connected to mail.charter.net (209.225.8.224).
Escape character is '^]'.
220 imp09 smtp.charter.net ESMTP server ready 20101208 043401
helo gmail.com
250 imp09 hello [75.126.162.205], pleased to meet you
mail from:myemail@gmail.com
250 2.1.0 <myemail@gmail.com> sender ok
rcpt to:therecipient@gmail.com
250 2.1.5 <therecipient@gmail.com> recipient ok
data
354 enter mail, end with "." on a line by itself
This is the text of my email.
.
250 2.0.0 Message received: 20101208093453.DLKN4190.mta31.charter.net@imp09 E0000
The telnet method works in either Linux or Windows.


If none of this answers your question, you will need to be more specific as to exactly what it is that you are trying to do.
 
2 members found this post helpful.
Old 12-09-2010, 08:24 PM   #4
tailinlinux
Member
 
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Blog Entries: 3

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by mikewc02 View Post
As wideyes mentioned, this question is quite vague. Also, Windows and Linux work completely differently. (Please note, though, that this is a Linux-specific forum.)

In Linux, if you are attempting to broadcast a message out to all other users logged into a particular machine, you can do so with the "wall" command.

Example:
Code:
# wall Text of your message
The "write" command does the same thing, but will allow you to send target the message to a particular user, rather than broadcasting out to everyone.

Sending messages to users in Windows is done through Task Manager. Task Manager has a tab called "Users" that will allow you to select a user who is currently logged in and send them a pop-up message by selecting the "Send Message" button at the bottom.

Now... if you're talking about sending emails from the command line, that can be done easily if you already have a mail agent (like Sendmail) installed and configured. To send an email with Sendmail, you would do it as follows.

Code:
# mail -s "Subject of email" recipient@theirdomain.com
After this, your cursor will move to a blank line. You will type the text of your email here, just as you would in a text editor. When completed, hit Ctrl+D. You'll be presented with a CC: line, and if you need to copy anyone, you will list their email address here. (If not, just leave it blank.) When you hit enter again, your message will be sent.

If you don't have Sendmail, Postfix, or whatever installed, you can also send an email by establishing a telnet connection to your mail server on port 25. Below is an example of me doing so through my ISP's mail server. (Email and IP addresses in output have been changed. The text in bold is what I typed.)

Code:
[mike@myserver ~]$ telnet mail.charter.net 25
Trying 209.225.8.224...
Connected to mail.charter.net (209.225.8.224).
Escape character is '^]'.
220 imp09 smtp.charter.net ESMTP server ready 20101208 043401
helo gmail.com
250 imp09 hello [75.126.162.205], pleased to meet you
mail from:myemail@gmail.com
250 2.1.0 <myemail@gmail.com> sender ok
rcpt to:therecipient@gmail.com
250 2.1.5 <therecipient@gmail.com> recipient ok
data
354 enter mail, end with "." on a line by itself
This is the text of my email.
.
250 2.0.0 Message received: 20101208093453.DLKN4190.mta31.charter.net@imp09 E0000
The telnet method works in either Linux or Windows.


If none of this answers your question, you will need to be more specific as to exactly what it is that you are trying to do.
using wall i cant send message.. into other user how to know if they received or see my message,
 
Old 12-09-2010, 08:50 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by tailinlinux View Post
using wall i cant send message..
What does "cant" mean? What happens when you use `wall` command? It doesn't work? Show us the error message. What is the problem with it?
Quote:
how to know if they received or see my message,
This I cannot answer. I suppose, wait and see if they send a message back? (I hope `wall` or `write` works for them..)

How about `write`? Did you try that?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
send message from linux to windows sachin1361 Linux - Enterprise 1 10-24-2008 09:45 AM
Send message from Linux to Windows helptonewbie Linux - Networking 5 02-14-2007 07:34 AM
how to send message from linux machine to windows barshani Linux - Software 2 10-27-2004 08:03 AM
how to send a message from linux to windows abd_bela Linux - Software 1 12-07-2002 02:17 PM
how to send instance message from linux to windows ddnehal Linux - Networking 2 07-23-2001 04:09 AM


All times are GMT -5. The time now is 01:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration