It is currently Sat Jan 16, 2021 11:22 pm
All times are UTC + 8 hours

Can't send email from shell

Can't send email from shell

Postby Mechano » Fri Mar 14, 2014 10:56 pm

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...
Mechano
 
Posts: 25
Joined: Wed Mar 12, 2014 7:34 am

Re: Can't send email from shell

Postby ho66es » Fri Mar 14, 2014 11:43 pm

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
ho66es
 
Posts: 476
Joined: Wed Mar 13, 2013 5:38 am

Re: Can't send email from shell

Postby Mechano » Sat Mar 15, 2014 2:25 am

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.
Mechano
 
Posts: 25
Joined: Wed Mar 12, 2014 7:34 am

Re: Can't send email from shell

Postby ho66es » Sat Mar 15, 2014 2:27 am

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
ho66es
 
Posts: 476
Joined: Wed Mar 13, 2013 5:38 am

Re: Can't send email from shell

Postby Mechano » Sat Mar 15, 2014 5:47 am

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:
viewtopic.php?f=49&t=3226
Mechano
 
Posts: 25
Joined: Wed Mar 12, 2014 7:34 am

Return to [Official] For AS-20X Series

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 2 guests

cron