Hi
I need example code for sending image/video through the mail.
You can use curl or sendmail command
you can use this busyboxbusybox-armv5l_1.26 (1.1 MB) :
root@swi-mdm9x28-wp:~# chmod 777 busybox-armv5l_1.26
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# ./busybox-armv5l_1.26 sendmail -help
sendmail: unrecognized option: h
BusyBox v1.26.2 (2017-01-10 16:10:07 GMT) multi-call binary.
Usage: sendmail [-tv] [-f SENDER] [-amLOGIN 4<user_pass.txt | -auUSER -apPASS]
[-w SECS] [-H ‘PROG ARGS’ | -S HOST] [RECIPIENT_EMAIL]…
Read email from stdin and send it
Standard options:
-t Read additional recipients from message body
-f SENDER For use in MAIL FROM:. Can be empty string
Default: -auUSER, or username of current UID
-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:
openssl s_client -quiet -tls1 -starttls smtp -connect smtp.gmail.com:25
openssl s_client -quiet -tls1 -connect smtp.gmail.com:465
$SMTP_ANTISPAM_DELAY: seconds to wait after helper connect
-S HOST[:PORT] Server (default $SMTPHOST or 127.0.0.1)
-amLOGIN Log in using AUTH LOGIN (-amCRAM-MD5 not supported)
-auUSER Username for AUTH
-apPASS Password for AUTH
If no -a options are given, authentication is not done.
If -amLOGIN is given but no -au/-ap, user/password is read from fd #4.
Other options are silently ignored; -oi is implied.
Use makemime to create emails with attachments.
Thankyou for your reply,
I’m using curl --url ‘smtps://smtp.gmail.com:465’ --ssl-reqd --mail-from ‘username@gmail.com’ --mail-rcpt ‘john@example.com’ --upload-file mail.txt --user ‘username@gmail.com:password’ --insecure{This commands only for text}
but i want to send images/videos in mail.please tell you how to send image/video through mail
i am not expert on curl, but you can have a look here: