I need to send email with html format. I have only linux command line and command \"mail\".
Currently have used:
echo \"To: address@example.com\" >
The problem is that when redirecting a file into 'mail' like that, it's used for the message body only. Any headers you embed in the file will go into the body instead.
Try:
mail --append="Content-type: text/html" -s "Built notification" address@example.com < /var/www/report.csv
--append lets you add arbitrary headers to the mail, which is where you should specify the content-type and content-disposition. There's no need to embed the To and Subject headers in your file, or specify them with --append, since you're implicitly setting them on the command line already (-s is the subject, and address@example.com automatically becomes the To).