send email from command line

Karl Larsen k5di at zianet.com
Tue Sep 23 22:46:14 UTC 2008


Eric Maquiling wrote:
> On Tue, Sep 23, 2008 at 10:43:52PM +0200, mierda tuti wrote:
>   
>> I would like to send e-mail outside of my lan, to send email to for example
>> to someone gmail email
>>     
>
> You mean something like this:
> mail someone at gmail.com < myfile
>
> You can try it and in another term window, do the following:
> tail -f /var/log/mail.log
>
> Then what are the errors saying?  (change someone at gmail.com to a real email)
>   
    I have loaded the mailx software. Here is what it says I have:

karl at karl-hardy:~$ mail -V
mail (GNU Mailutils 1.1)

This you can get with apt-get install mail and it works right out of the 
box between users on your own computer. I use it to read the root mail 
from cron and today had one about a problem I need to check. It is 100% 
command line.

Now there must be a way to set up mail so if you use a good email 
address like

mail k5di at zianet.com

it should send that, but I think it is trying to get sendmail to send it 
and mine is not set up. There should be a way to set the SMTP to be the 
one we pay for. Does anyone do this or know how? I have these files:

karl at karl-hardy:~$ ls /etc/mail*
/etc/mailcap  /etc/mailcap.order  /etc/mailname  /etc/mail.rc  /etc/mail.rc~
karl at karl-hardy:~$

In mail.rc you can put your whole email list into. The mailcap file is 
large and I do not know if you want to mess with it.

Karl


-- 

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
   PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7





More information about the ubuntu-users mailing list