How can I send an email from the command line?
David M. Carney
carney1979 at gmail.com
Sat Feb 12 13:41:36 UTC 2005
On Sat, 12 Feb 2005 10:39:19 +0000, Neil Woolford
<neil at neilwoolford.co.uk> wrote:
> Hi all,
>
> I'd like to semi-automatically send a short email of system information
> from my brother's computer to mine. The nearer I can get to a 'one
> click' process the better.
>
> Evolution works fine on my brother's machine, and he knows how to use
> the basic mail features. So if I could get a script to start evolution
> and fill in a message, he could easily send it to me. Frustratingly,
> while I can find how to initiate a message from the command line
> ("evolution mailto:joe at soap.com"), I can't find out how to insert text
> into the message from the command line. This must be possible, as Gnome
> does it when sending an invitation to a VNC session. I can't find any
> proper man pages about using Evolution from the command line, so I'm
> stuck.
>
> Any suggestions?
>
> Neil
>
> PS I have already tried 'mail' at the command line; this worked for
> sending mails between local users on my machine, but although a data
> package did appear to leave when I tried to send to a full email address
> via my ISP, nothing arrived and no error messages were given. (I
> understand that other people's mileage varies here...).
>
> If someone could point me in the right direction to configure this so
> that it works, that would be another way to solve the problem.
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
Have you tried Mutt?
If it's properly configured with your return address, you can type (at
the console commandline):
mutt -x
Then it will reply by asking who the email is going to like this:
To:
Then it asks the subject like:
Subject:
Then it tells you to type in your message and when you are done, place
a period (.) on a line by itself and hit return.
When you do this, it sends the message.
If you install Mutt and checkout it's man page, you might be able to
make it set the address and subject from the commandline as part of
the "mutt -x" command.
If you want content automagically inserted, perhaps a signature file?
Best of luck, and thanks for your post. I'd forgotten about using Mutt
to mail from the commandline.
David
--
Registered Linux User #297958
--------------------------------------------------
I have 50 Gmail Invitations. If you
want one, please email me
directly at carney1979 at gmail.com.
More information about the ubuntu-users
mailing list