LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-02-2011, 07:39 PM   #1
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Rep: Reputation: 49
Is it possible to send an email to abc123@gmail.com directly from Konsole?


Hello:

If it is possible, do I need to do some 'configuration stuff' to get it to work?

How do I start it?

Thanks,
 
Old 03-02-2011, 08:02 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
If you are asking if it is possible, in general, to send an email from the console then yes. People sent email that way for many years before we got modern web-based email and GUI clients.

The more important question is how you want to send this email and from what address. How you actually send out the email will depend on whether or not you are trying to send it from a valid email address, and where that email is hosted. For instance, sending email without a return address is easy enough, but if you are looking to route outgoing email through GMail for example, that will take additional work.
 
1 members found this post helpful.
Old 03-02-2011, 08:03 PM   #3
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Rep: Reputation: 7
what do you mean by 'directly'?
there is mutt and pine. or do you want to just type in a command?
 
1 members found this post helpful.
Old 03-02-2011, 08:11 PM   #4
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by ewsmith View Post
what do you mean by 'directly'?
there is mutt and pine. or do you want to just type in a command?
I think I read somewhere that you can type something like 'mail' or maybe it was 'sendmail' and an address like abc123@gmail.com and then you are asked for subject then body then it goes.

I think I read this in a book so I'm trying to find it now.

Thanks,
 
Old 03-02-2011, 08:14 PM   #5
octoberblu3
Member
 
Registered: Oct 2005
Distribution: Slackware64-current
Posts: 67

Rep: Reputation: 22
If you want a nice console email client, check out alpine.

If you want something that you can script easily, just use the mail command. It just goes as 'mail some.address@example.com' and pipe the message in through stdin. You can set the subject via command line arg, or just include the header in the piped text. 'man mail' will give you all the details you need.

Last edited by octoberblu3; 03-02-2011 at 08:15 PM.
 
1 members found this post helpful.
Old 03-02-2011, 08:28 PM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
I can send mail like this to my gmail account (this is not the real one) as I have sendmail running :
Code:
echo "Next test for you mate" | mail -s "Next Thing"  thisibgeddy@gmail.com
and it just goes. You can also pipe through sendmail but I find that a bit more fiddly. I can send a file like this :
Code:
cat file1  | /usr/bin/sendmail thisisbgeddy@gmail.com

Last edited by bgeddy; 03-02-2011 at 08:30 PM.
 
1 members found this post helpful.
Old 03-02-2011, 08:50 PM   #7
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
Yes, you can.

If your server has MX, PTR record, you can configure it to send mail normally. If no, you can send through Gmail's SMTP.
 
1 members found this post helpful.
Old 03-02-2011, 09:25 PM   #8
FredGSanford
Senior Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia 7 - Debian 10 - Artix Linux
Posts: 1,142
Blog Entries: 5

Rep: Reputation: 207Reputation: 207Reputation: 207
Quote:
Originally Posted by bgeddy View Post
I can send mail like this to my gmail account (this is not the real one) as I have sendmail running :
Code:
echo "Next test for you mate" | mail -s "Next Thing"  thisibgeddy@gmail.com
I just tried that and it worked for me....very interesting.
 
1 members found this post helpful.
Old 03-03-2011, 05:34 AM   #9
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
I stumbled upon SendEmail a couple of months back, and it's purrrfeccct.

http://caspian.dotconf.net/menu/Software/SendEmail/

cheers,

Last edited by mrclisdue; 03-03-2011 at 05:36 AM. Reason: defective link
 
1 members found this post helpful.
Old 03-03-2011, 10:25 AM   #10
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by mrclisdue View Post
I stumbled upon SendEmail a couple of months back, and it's purrrfeccct.

http://caspian.dotconf.net/menu/Software/SendEmail/

cheers,
Hello:

I tried sendEmail and this is what happened:
Code:
root@darkstar:/home/rob# sendEmail -f robert.thompson@gmail.com -t robert.thompson@gmail.com -u test -m testsendEmail
Mar 03 11:21:41 darkstar sendEmail[8314]: ERROR => Connection attempt to localhost:25 failed: IO::Socket::INET: connect: Connection refused
root@darkstar:/home/rob#
Then I tried the example:
Code:
root@darkstar:/home/rob# sendEmail -f robert.thompson@gmail.com  -t robert.thompson@gmail.com -s smtp.gmail.com:587                   -xp xxxxix                    -u "Test email"                    -m "Hi buddy, this is a test email."                                
Mar 03 11:31:12 darkstar sendEmail[8717]: ERROR => Received:    530 5.7.0 Must issue a STARTTLS command first. wt14sm916625icb.4 
root@darkstar:/home/rob# STARTTLS                                                                                                             
bash: STARTTLS: command not found
Is there some sort of set up that I must do first?

Thanks,

Last edited by Robert.Thompson; 03-03-2011 at 10:35 AM.
 
Old 03-03-2011, 10:37 AM   #11
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
it looks like it's still sending the email to the local MTA, maybe you should specify google servers with their proper port.

in this cases maybe msmtp could be an alternative.
 
1 members found this post helpful.
Old 03-03-2011, 10:39 AM   #12
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
for SendEmail, you'll have to install a couple of perl modules for tls support:

Quote:
TLS Support
Starting with sendEmail v1.54, TLS support is included! To enable TLS support simply install the Net::SSLeay and IO::Socket::SSL perl modules. The following new command line parameters are now available:
-o tls=auto This is the default, TLS will be used if possible.
-o tls=yes Use this to require TLS for message delivery.
-o tls=no Use this to disable TLS support.
If TLS is giving strange errors, try upgrading the Net::SSLeay and IO::Socket::SSL perl modules. Please do NOT report TLS bugs unless you have already done this! If you're running up-to-date versions of these modules and you are getting TLS errors, your detailed bug report will be appreciated. Yes, you can finally use SendEmail to send messages to your GMail account
here's an example that I've got in a cron job to remind me to call m'dad daily....

Code:
/usr/local/bin/sendEmail -o tls=auto -f mrclisdue@gmail.com -t 5193775481@msg.telus.com -m 'call dad' -s smtp.gmail.com:587 -xu mrclisdue@gmail.com -xp *********
note that the -s indicates that I'm using my gmail account to send the mail, and not localhost:25....

cheers,

Last edited by mrclisdue; 03-03-2011 at 10:49 AM.
 
Old 03-03-2011, 11:03 AM   #13
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Original Poster
Rep: Reputation: 49
Hello:

I keep getting the following error msg:
Code:
Mar 03 12:00:32 darkstar sendEmail[9936]: NOTICE => Authentication not supported by the remote SMTP server!
Mar 03 12:00:32 darkstar sendEmail[9936]: ERROR => Received:    530 5.7.0 Must issue a STARTTLS command first. i2sm932965icv.3
Any ideas as to how to resolve this?

Thanks,
 
Old 03-03-2011, 11:12 AM   #14
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
can we have a look-see at the command you're issuing?

cheers,
 
Old 03-03-2011, 11:25 AM   #15
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Original Poster
Rep: Reputation: 49
Hello:

I have been doing some reading about all of this on the web and have decided that this stuff is way over my head at the moment, may be, at any moment.

Thank you very much for your time and great information!

Marking as SOLVED.
 
  


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 jpeg files to selphy printers directly? RenegadeX Linux - Hardware 1 03-02-2010 10:10 AM
My Postfix mailserver can't send out mails directly! gubak Linux - Networking 4 03-28-2006 07:09 PM
send eth pkt directly to datalink(PF_PACKET) milod Programming 6 10-29-2003 11:48 AM
LICQ: send through server OR send directly mikeshn Linux - Software 0 06-09-2003 06:14 PM
send eth pkt directly to datalink(PF_PACKET) milod Linux - Networking 0 03-05-2003 09:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:22 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
Open Source Consulting | Domain Registration