Can't send email from shell

Moderator: Lillian.W@AST

Post Reply
Mechano
Posts: 25
youtube meble na wymiar Warszawa
Joined: Wed Mar 12, 2014 7:34 am

Can't send email from shell

Post by Mechano »

I cant send email from shell.
No mail command.

It's useful to send email from cronjob scripts.

Also Perl, Python and PHP can send email without hassle.

This OS is too much limited...
ho66es
Posts: 476
Joined: Wed Mar 13, 2013 5:38 am

Re: Can't send email from shell

Post by ho66es »

try sendmail

Code: Select all

# sendmail
BusyBox v1.19.3 (2014-03-11 05:44:53 CST) multi-call binary.

Usage: sendmail [OPTIONS] [RECIPIENT_EMAIL]...

Read email from stdin and send it

Standard options:
        -t              Read additional recipients from message body
        -f SENDER       Sender (required)
        -o OPTIONS      Various options. -oi implied, others are ignored
        -i              -oi synonym. implied and ignored

Busybox specific options:
        -v              Verbose
        -w SECS         Network timeout
        -H 'PROG ARGS'  Run connection helper
                        Examples:
                        -H 'exec openssl s_client -quiet -tls1 -starttls smtp
                                -connect smtp.gmail.com:25' <email.txt
                                [4<username_and_passwd.txt | -au<username> -ap<password>]
                        -H 'exec openssl s_client -quiet -tls1
                                -connect smtp.gmail.com:465' <email.txt
                                [4<username_and_passwd.txt | -au<username> -ap<password>]
        -S HOST[:PORT]  Server
        -au<username>   Username for AUTH LOGIN
        -ap<password>   Password for AUTH LOGIN
        -am<method>     Authentication method. Ignored. LOGIN is implied

Other options are silently ignored; -oi -t is implied
Use makemime applet to create message with attachments
608t
Mechano
Posts: 25
Joined: Wed Mar 12, 2014 7:34 am

Re: Can't send email from shell

Post by Mechano »

That's ok...

But where's openssl needed for crypted authenticating?

Sendmail says openssl is missed.

I've tried installing with ipkg, but nothing it doesn't find.
ho66es
Posts: 476
Joined: Wed Mar 13, 2013 5:38 am

Re: Can't send email from shell

Post by ho66es »

sorry, you never mentioned that requirement in your first post
Mechano wrote:That's ok...

But where's openssl needed for crypted authenticating?

Sendmail says openssl is missed.

I've tried installing with ipkg, but nothing it doesn't find.
608t
Mechano
Posts: 25
Joined: Wed Mar 12, 2014 7:34 am

Re: Can't send email from shell

Post by Mechano »

I've been able to let it works with SSL authentication and the main providers like GMail or Yahoo!.

I wrote an how to here:
http://forum.asustor.com/viewtopic.php?f=49&t=3226
Post Reply

Return to “[Official] For AS-20X Series”