LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-03-2019, 06:06 PM   #1
Mahmudecek
LQ Newbie
 
Registered: Nov 2019
Posts: 8
Blog Entries: 1

Rep: Reputation: Disabled
Question send mail by command?


Hi guys. I'm still starting learn Linux, I have searched, tried more commands from google, I want to send mail from Centos machine to my private mail , please can you provide me by the correct command , please if u can try the command before send it to me, coz I have tried more commands and all failed like mail -s subject mail , mailx mail .....
Thanks
Mahmoud
 
Old 12-03-2019, 06:24 PM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554
Just because a command works for someone else, doesn't mean it'll work for you - for example, do you have a mail server setup?

If you give more details on exactly what commands you've tried and how they've failed, someone may be able to help resolve the issues.
 
Old 12-03-2019, 07:27 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Setting up command line email is more complex than one might expect; it requires several different parts configured to work together.

This is a good overview: https://www.linuxtopia.org/HowToGuid...il_intro1.html

A web search for "configure command line email linux" will turn up a number of tutorials.

Personally, I recommend Mutt as a mail client.
 
Old 12-04-2019, 01:37 PM   #4
Mahmudecek
LQ Newbie
 
Registered: Nov 2019
Posts: 8

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
thanks I tried mutt, but i got an issue SASL authentication failed , i don't understand it, also google din't give me a solution
 
Old 12-04-2019, 01:50 PM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,929

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
sending a mail from a linux box requires some work/configuration. Without that you will not be able to send mail at all.
also see post #2 and: http://catb.org/~esr/faqs/smart-ques...html#beprecise
 
Old 12-04-2019, 01:51 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by Mahmudecek View Post
thanks I tried mutt, but i got an issue SASL authentication failed , i don't understand it, also google din't give me a solution
If you post the exact errors, messages, and commands you're entering, we might be able to help. So far, you've given us one generic message, without telling us how you configured MUTT. You also don't say what mail system you're trying to connect TO, and when you said in your first post "...all failed like mail -s subject mail , mailx mail", that also doesn't tell us anything.

We can try to help, but we can't without knowing what you've done, tried, and what you're seeing.
 
Old 12-04-2019, 02:14 PM   #7
Mahmudecek
LQ Newbie
 
Registered: Nov 2019
Posts: 8

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
thanks for help i appreciate that, i'm totally new with linux, sorry for short info that i gave, so on my vm i'm using centos 8 machine, and i'm trying to send mail to post.cz , it is something for study to understand how is going to send mail via linux, so i have used mutt as in this videohttps://www.youtube.com/watch?v=tv8jSCqRmUY with this configuration https://www.thegeekdiary.com/how-to-...n-centos-rhel/ but it gave me an error that SASL authentication failed that is after clicking y to send the mail. also I have tried mail -s subj "receiver mail" that didn't gave me any error but i didn't receive the mail so sure that the command didn't word as normal, and the same issue with mailx with the same syntax , that is all. thanks

Last edited by Mahmudecek; 12-04-2019 at 02:16 PM. Reason: add an info
 
Old 12-04-2019, 02:24 PM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,929

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
most probably the configuration you made is incorrect (or just mistyped something?). Without details hard to say anything.
 
Old 12-05-2019, 09:10 AM   #9
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by Mahmudecek View Post
coz I have tried more commands and all failed like mail -s subject mail , mailx mail .....
Can you show us exact commands that you tried?
And what is the exact failure message?

On my RHEL/CentOS machine, this works:

Code:
echo "test email" | mail -s "testing" myemail@mydomain.com
If that does not work for you then your configuration is incorrect.
In that case, what did you change and what is the exact failure message?
 
  


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
LAN mail clients cannot send mail (receiving mail is working) rnturn Linux - Server 2 07-22-2015 11:53 PM
Debian etch - Unable to send mail from command line or from php mail command lqforumuser Linux - Newbie 1 03-01-2009 06:56 AM
can mail command be used to send mail onto global mail servers like yahoo etc dale_chip Linux - Newbie 4 08-12-2008 08:33 AM
Postfix : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:38 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