LinuxQuestions.org
Review your favorite Linux distribution.
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, 07:06 PM   #1
Mahmudecek
LQ Newbie
 
Registered: Nov 2019
Posts: 6

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, 07:24 PM   #2
boughtonp
Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 47

Rep: Reputation: 13
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, 08: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: 15,629
Blog Entries: 26

Rep: Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574Reputation: 4574
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, 02:37 PM   #4
Mahmudecek
LQ Newbie
 
Registered: Nov 2019
Posts: 6

Original Poster
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, 02:50 PM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,290

Rep: Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207
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, 02:51 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,127

Rep: Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922Reputation: 5922
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, 03:14 PM   #7
Mahmudecek
LQ Newbie
 
Registered: Nov 2019
Posts: 6

Original Poster
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 03:16 PM. Reason: add an info
 
Old 12-04-2019, 03:24 PM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,290

Rep: Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207Reputation: 4207
most probably the configuration you made is incorrect (or just mistyped something?). Without details hard to say anything.
 
Old 12-05-2019, 10:10 AM   #9
dc.901
Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS 6-7; SuSE 8-12
Posts: 611

Rep: Reputation: 176Reputation: 176
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


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

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

All times are GMT -5. The time now is 01:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration