• Mint send email from command line

    From Graham J@nobody@nowhere.co.uk to alt.os.linux on Sat Jul 11 22:32:35 2026
    From Newsgroup: alt.os.linux

    Can anybody suggest a simple utility for sending emails from the command
    line, which I could incorporate in a shell script, please?

    I'm trying to replicate what I use in Windows, which looks like this:

    mailsend1.19 %from% %to% %subject% %message% %server% %security%
    %user% %password%

    So I need to specify details of the form:

    from=me@mydomain.com
    to=you@yourdomain.com
    subject="subject text string"
    message="message text string"
    server=smtpserver@mydomain.com
    security= ssl port=465 -auth
    smtp_user=me@mydomain.com
    smtp_password=<mypassword>

    Thanks.
    --
    Graham J
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Paul@nospam@needed.invalid to alt.os.linux on Sat Jul 11 17:47:37 2026
    From Newsgroup: alt.os.linux

    On Sat, 7/11/2026 5:32 PM, Graham J wrote:
    Can anybody suggest a simple utility for sending emails from the command line, which I could incorporate in a shell script, please?

    I'm trying to replicate what I use in Windows, which looks like this:

    mailsend1.19 %from%  %to%  %subject%  %message%  %server%  %security% %user%  %password%

    So I need to specify details of the form:

    from=me@mydomain.com
    to=you@yourdomain.com
    subject="subject text string"
    message="message text string"
    server=smtpserver@mydomain.com
    security= ssl port=465 -auth
    smtp_user=me@mydomain.com
    smtp_password=<mypassword>

    Thanks.



    I tried this as a search

    linux administrator command line email

    And this is an intro. of that sort of thing.

    https://www.digitalocean.com/community/tutorials/send-email-linux-command-line

    Some more examples.

    https://devopswithamol.medium.com/mastering-email-from-the-linux-command-line-a-developers-guide-97c839f3404c

    Paul
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Gamgee@gamgee@palantirbbs.ddns.net.remove-d92-this to Graham J on Sat Jul 11 20:55:20 2026
    From Newsgroup: alt.os.linux

    To: Graham J
    Graham J wrote to alt.os.linux <=-

    From Newsgroup: alt.os.linux

    Can anybody suggest a simple utility for sending emails from the
    command line, which I could incorporate in a shell script, please?

    I'm trying to replicate what I use in Windows, which looks like this:

    mailsend1.19 %from% %to% %subject% %message% %server% %security% %user% %password%

    So I need to specify details of the form:

    from=me@mydomain.com
    to=you@yourdomain.com
    subject="subject text string"
    message="message text string"
    server=smtpserver@mydomain.com
    security= ssl port=465 -auth
    smtp_user=me@mydomain.com
    smtp_password=<mypassword>

    Thanks.

    I use either 's-nail' or 'mailx', depending on what system/distro is
    being used. Both work well. You'd want to create a '.mailrc' file in
    your home directory.



    ... Gone crazy, be back later, please leave message.
    --- MultiMail/Linux v0.52
    --- Synchronet 3.22a-Linux NewsLink 1.2
    Palantir BBS - telnet://palantirbbs.ddns.net
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Graham J@nobody@nowhere.co.uk to alt.os.linux on Sun Jul 12 09:14:29 2026
    From Newsgroup: alt.os.linux

    Paul wrote:
    [snip]

    I tried this as a search

    linux administrator command line email

    And this is an intro. of that sort of thing.

    https://www.digitalocean.com/community/tutorials/send-email-linux-command-line

    The digitalocean site repeatedly flashes its cookie acceptance dialog
    and is unuseable. This is with both Firefox and Chrome.

    Some more examples.

    https://devopswithamol.medium.com/mastering-email-from-the-linux-command-line-a-developers-guide-97c839f3404c

    I tried to install mailutils. It failed to tell me that I had to use
    the <tab> key to navigate the configuration (rather than up/down or
    simply <enter> but having discovered the <tab> key was useful the configuration appeared to complete OK.

    I can invoke it, with either:

    mail
    or
    mail.mailutils

    and in both cases I see:
    Cannot open mailbox /var/mail/graham: no such file or directory.

    ... well, obviously, I don't want a mailbox.

    Man mail is voluminous but doesn't give any useful examples.

    I suspect it's too sophisticated for my needs. Is there something
    simpler that I can install on Mint?
    --
    Graham J
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Carlos E. R.@robin_listas@es.invalid to alt.os.linux on Sun Jul 12 13:29:12 2026
    From Newsgroup: alt.os.linux

    On 2026-07-12 10:14, Graham J wrote:
    Paul wrote:
    [snip]

    I tried this as a search

         linux administrator command line email

    And this is an intro. of that sort of thing.

        https://www.digitalocean.com/community/tutorials/send-email-linux- >> command-line

    The digitalocean site repeatedly flashes its cookie acceptance dialog
    and is unuseable.  This is with both Firefox and Chrome.

    Some more examples.

        https://devopswithamol.medium.com/mastering-email-from-the-linux-
    command-line-a-developers-guide-97c839f3404c

    I tried to install mailutils.  It failed to tell me that I had to use
    the <tab> key to navigate the configuration (rather than up/down or
    simply <enter> but having discovered the <tab> key was useful the configuration appeared to complete OK.

    I can invoke it, with either:

    mail
    or
    mail.mailutils

    and in both cases I see:
    Cannot open mailbox /var/mail/graham: no such file or directory.

    ... well, obviously, I don't want a mailbox.

    Yes, you do. It is Linux.


    Man mail is voluminous but doesn't give any useful examples.

    I suspect it's too sophisticated for my needs.  Is there something
    simpler that I can install on Mint?

    Don't install, use whatever your distribution uses. You have to ask in a mint forum or group.

    For example, in one script of mine, I use:

    echo -e "$NOTIFYTYPE\r\n\r\nUPS: $UPSNAME\r\nAlert type: $NOTIFYTYPE\r\n\r\n`upsc $UPSNAME`" | \
    mail -r username@MAILSERVER.net -s "NUT report Isengard ($NOTIFYTYPE)" \
    MYNAME@gmail.com


    But it works that simple because before using mail I configured postfix. mail is actually mailx. mailx can also be configured to work without an SMTP local server.
    --
    Cheers,
    Carlos E.R.
    ES🇪🇸, EU🇪🇺;
    --- Synchronet 3.22a-Linux NewsLink 1.2