Sending mail to SMTP from command line
George Georgalis
george at galis.org
Mon Jan 23 18:46:57 PST 2006
On Sun, Jan 22, 2006 at 06:03:29PM +0100, Matias Surdi wrote:
>
>Can some body tell me how can I send a mail from the command line (or a
>bash script) to a remote (ISP) SMTP server???
>
>I don't want to have my own mta enabled on my host, just send a mail as
>I would do from mozilla thunderbird, but from the command line.
>
mutt is a console (text) email client, it's pretty good, but no built
in mta (maybe you can use the "sendmail -q from cron" technique); mutt
is the easiest way to send emails with attachments (eg png graphs) from
scripts.
if you just want to send text, you can pipe a message to "mail" -- but
you'll still have to work out the mta thing. of course telnet works too,
heh, even for web pages if you speak HTTP!
// George
--
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george at galis.org
More information about the freebsd-isp
mailing list