LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-01-2005, 09:06 AM   #1
iflorea
LQ Newbie
 
Registered: Jul 2003
Location: ro
Distribution: FC4
Posts: 15

Rep: Reputation: 0
can i send mail from command line?


hello
i want to send a mail message from a script
can anybody tell me how can i do this?
thanks
 
Old 11-01-2005, 09:16 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Code:
man mail or man mailx
 
Old 11-01-2005, 09:32 AM   #3
iflorea
LQ Newbie
 
Registered: Jul 2003
Location: ro
Distribution: FC4
Posts: 15

Original Poster
Rep: Reputation: 0
maybe i did'n understand well but i want to send mail in non interactive mode
i already send a mail with mail but i had to write it interectively and to press ctrl+D to end it...
 
Old 11-02-2005, 03:23 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you have saved your message in a file you can:
Code:
mail -s "subject" user@domain.com < message
 
Old 11-02-2005, 03:29 AM   #5
iflorea
LQ Newbie
 
Registered: Jul 2003
Location: ro
Distribution: FC4
Posts: 15

Original Poster
Rep: Reputation: 0
tanks to all
Meanwhile i found another one solution:
sendmail user@domain.com < mail_file
bye
 
Old 11-02-2005, 04:14 AM   #6
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
This is a bit of a shameless plug but you can read this article on sending mails from the command line:

http://www.linux.com/article.pl?sid=05/10/07/172259
 
Old 11-02-2005, 07:08 AM   #7
unixbhaskar
LQ Newbie
 
Registered: Aug 2005
Location: India
Distribution: Gentoo,Arch ,Fedora,Debian
Posts: 9

Rep: Reputation: 0
i hope u have got ur ans
 
  


Reply



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
How to send mail from command line buskmann Linux - Newbie 7 07-23-2006 10:18 PM
Send HTML mail via command line interface xlash Linux - General 2 11-02-2005 01:02 PM
Command Line Send Mail nutthick Linux - Newbie 10 01-24-2005 07:52 PM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM
internet line down, cant send mail internally. dashburner Linux - Networking 1 11-12-2003 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:59 AM.

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
Open Source Consulting | Domain Registration